File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1192,6 +1192,7 @@ extension MainFeedCollectionViewController {
11921192 func markUnstarredAsReadAction( indexPath: IndexPath ) -> UIAction ? {
11931193 guard let sidebarItem = dataSource. itemIdentifier ( for: indexPath) ? . node. representedObject as? SidebarItem ,
11941194 let contentView = self . collectionView. cellForItem ( at: indexPath) ? . contentView,
1195+ sidebarItem. unreadCount > 0 ,
11951196 let articles = try ? sidebarItem. fetchUnreadArticles ( ) ,
11961197 Array ( articles) . unreadUnstarredArticles ( ) != nil else {
11971198 return nil
@@ -1234,6 +1235,7 @@ extension MainFeedCollectionViewController {
12341235
12351236 func markUnstarredAsReadAlertAction( indexPath: IndexPath , completion: @escaping ( Bool ) -> Void ) -> UIAlertAction ? {
12361237 guard let feed = dataSource. itemIdentifier ( for: indexPath) ? . node. representedObject as? Feed ,
1238+ feed. unreadCount > 0 ,
12371239 let articles = try ? feed. fetchArticles ( ) ,
12381240 Array ( articles) . unreadUnstarredArticles ( ) != nil ,
12391241 let contentView = self . collectionView. cellForItem ( at: indexPath) ? . contentView else {
You can’t perform that action at this time.
0 commit comments