mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix bug that prevented Mark All As Read button from enabling until a status change event occurred
This commit is contained in:
@@ -136,8 +136,9 @@ private extension SceneModel {
|
||||
self?.updateNextUnreadButtonState(accountManager: accountManager)
|
||||
}.store(in: &cancellables)
|
||||
|
||||
let combinedPublisher = timelineModel.$articles.combineLatest(timelineModel.$selectedArticles,
|
||||
NotificationCenter.default.publisher(for: .StatusesDidChange))
|
||||
let blankNotification = Notification(name: .StatusesDidChange)
|
||||
let statusesDidChangePublisher = NotificationCenter.default.publisher(for: .StatusesDidChange).prepend(blankNotification)
|
||||
let combinedPublisher = timelineModel.$articles.combineLatest(timelineModel.$selectedArticles, statusesDidChangePublisher)
|
||||
|
||||
combinedPublisher.sink { [weak self] (articles, selectedArticles, _) in
|
||||
self?.updateMarkAllAsReadButtonsState(articles: articles)
|
||||
|
||||
Reference in New Issue
Block a user