Fix bug that prevented Mark All As Read button from enabling until a status change event occurred
This commit is contained in:
parent
fe2b81b47b
commit
a521673ac6
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue