Skip to content

Commit

Permalink
Targeted concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
bourvill committed Feb 8, 2024
1 parent 279624d commit e972656
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions App/Features/PasteBoard/PasteBoardViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
private var cancellableNotification: AnyCancellable?

init() {
cancellableNotification = NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)
.map { _ -> Bool in
guard let pasteBoardUrl = UIPasteboard.general.url,
pasteBoardUrl.absoluteString != WallabagUserDefaults.previousPasteBoardUrl
else {
return false
}
return true
}
.assign(to: \.showPasteBoardView, on: self)
// cancellableNotification = NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)
// .map { _ -> Bool in
// guard let pasteBoardUrl = UIPasteboard.general.url,
// pasteBoardUrl.absoluteString != WallabagUserDefaults.previousPasteBoardUrl
// else {
// return false
// }
// return true
// }
// .assign(to: \.showPasteBoardView, on: self)
}

deinit {
Expand Down

0 comments on commit e972656

Please sign in to comment.