Add download events to timeline management

This commit is contained in:
Maurice Parker
2020-07-26 12:00:57 -05:00
parent fbf0c60d55
commit d1b015ce21
2 changed files with 73 additions and 44 deletions

View File

@@ -126,8 +126,7 @@ private extension SceneModel {
// MARK: Subscriptions
func subscribeToToolbarChangeEvents() {
guard let selectedArticlesPublisher = timelineModel.selectedArticlesPublisher,
let articlesPublisher = timelineModel.articlesPublisher else { return }
guard let selectedArticlesPublisher = timelineModel.selectedArticlesPublisher else { return }
NotificationCenter.default.publisher(for: .UnreadCountDidChange)
.compactMap { $0.object as? AccountManager }
@@ -146,7 +145,7 @@ private extension SceneModel {
.store(in: &cancellables)
statusesDidChangePublisher
.combineLatest(articlesPublisher)
.combineLatest(timelineModel.articlesSubject)
.sink { [weak self] _, articles in
self?.updateMarkAllAsReadButtonsState(articles: articles)
}