#1802 (total count is double feed/folder sum count)

- Fixed. (Not quite double, but it was counting each instance of feeds that are in multiple folders; now it only counts the unique set of feeds.)
This commit is contained in:
David Sinclair 2023-06-15 16:40:56 -07:00
parent 9e2e73bfd2
commit ea1397e461

View file

@ -2753,15 +2753,19 @@
[folderName isEqual:@"infrequent"] ||
(!folderName && ([storiesCollection.activeFolder isEqual:@"everything"] ||
[storiesCollection.activeFolder isEqual:@"infrequent"]))) {
NSMutableSet *uniqueFeeds = [NSMutableSet new];
for (NSArray *folder in [self.dictFolders allValues]) {
for (id feedId in folder) {
if ([feedId isKindOfClass:[NSString class]] && [feedId startsWith:@"saved:"]) {
// Skip saved feeds which have fake unread counts.
continue;
}
[counts addCounts:[self splitUnreadCountForFeed:feedId]];
[uniqueFeeds addObject:feedId];
}
}
for (NSString *feedId in uniqueFeeds) {
[counts addCounts:[self splitUnreadCountForFeed:feedId]];
}
} else {
if (!folderName) {
folder = [self.dictFolders objectForKey:storiesCollection.activeFolder];