Change how smart feeds are shown so that they appear even if they have been filtered

This commit is contained in:
Maurice Parker 2020-11-19 05:23:07 -06:00
parent 63660d7b7d
commit 1a65211f19
2 changed files with 12 additions and 12 deletions

View File

@ -807,24 +807,24 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
}
}
func selectTodayFeed() {
func selectTodayFeed(completion: (() -> Void)? = nil) {
markExpanded(SmartFeedsController.shared)
self.ensureFeedIsAvailableToSelect(SmartFeedsController.shared.todayFeed) {
self.selectFeed(SmartFeedsController.shared.todayFeed, animations: [.navigation, .scroll])
self.selectFeed(SmartFeedsController.shared.todayFeed, animations: [.navigation, .scroll], completion: completion)
}
}
func selectAllUnreadFeed() {
func selectAllUnreadFeed(completion: (() -> Void)? = nil) {
markExpanded(SmartFeedsController.shared)
self.ensureFeedIsAvailableToSelect(SmartFeedsController.shared.unreadFeed) {
self.selectFeed(SmartFeedsController.shared.unreadFeed, animations: [.navigation, .scroll])
self.selectFeed(SmartFeedsController.shared.unreadFeed, animations: [.navigation, .scroll], completion: completion)
}
}
func selectStarredFeed() {
func selectStarredFeed(completion: (() -> Void)? = nil) {
markExpanded(SmartFeedsController.shared)
self.ensureFeedIsAvailableToSelect(SmartFeedsController.shared.starredFeed) {
self.selectFeed(SmartFeedsController.shared.starredFeed, animations: [.navigation, .scroll])
self.selectFeed(SmartFeedsController.shared.starredFeed, animations: [.navigation, .scroll], completion: completion)
}
}

View File

@ -111,9 +111,9 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
if AccountManager.shared.isSuspended {
AccountManager.shared.resumeAll()
}
self.coordinator.selectFeed(SmartFeedsController.shared.unreadFeed, completion: {
self.coordinator.selectAllUnreadFeed() {
self.coordinator.selectArticleInCurrentFeed(id!)
})
}
} else {
self.coordinator.selectAllUnreadFeed()
}
@ -127,9 +127,9 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
if AccountManager.shared.isSuspended {
AccountManager.shared.resumeAll()
}
self.coordinator.selectFeed(SmartFeedsController.shared.todayFeed, completion: {
self.coordinator.selectTodayFeed() {
self.coordinator.selectArticleInCurrentFeed(id!)
})
}
} else {
self.coordinator.selectTodayFeed()
}
@ -143,9 +143,9 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
if AccountManager.shared.isSuspended {
AccountManager.shared.resumeAll()
}
self.coordinator.selectFeed(SmartFeedsController.shared.starredFeed, completion: {
self.coordinator.selectStarredFeed() {
self.coordinator.selectArticleInCurrentFeed(id!)
})
}
} else {
self.coordinator.selectStarredFeed()
}