mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 17:29:23 +00:00
Merge pull request #5480 from cartesian-plane/fix/hang-contextual-menu-5450
Move article fetch after “Mark All as Read” action
This commit is contained in:
1 file changed
+3
-4
@@ -1518,9 +1518,7 @@ extension MainTimelineViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let fetchedArticles = feed.fetchArticles()
|
||||
let articles = Array(fetchedArticles)
|
||||
guard articles.canMarkAllAsRead(), let collectionView, let contentView = collectionView.cellForItem(at: indexPath)?.contentView else {
|
||||
guard feed.unreadCount > 0, let collectionView, let contentView = collectionView.cellForItem(at: indexPath)?.contentView else {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1529,7 +1527,8 @@ extension MainTimelineViewController {
|
||||
|
||||
let action = UIAction(title: title, image: Assets.Images.markAllAsRead) { [weak self] _ in
|
||||
MarkAsReadAlertController.confirm(self, confirmTitle: title, sourceType: contentView) { [weak self] in
|
||||
self?.markAllAsRead(articles)
|
||||
let articles = feed.fetchUnreadArticles()
|
||||
self?.markAllAsRead(Array(articles))
|
||||
}
|
||||
}
|
||||
return action
|
||||
|
||||
Reference in new issue
Block a user