mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
1747 (marking a feed as read takes you to the wrong feed)
- Now repeats selecting the next folder or feed until it finds a folder or feed that isn’t muted and has unread stories.
This commit is contained in:
parent
67219d0b63
commit
f0a0fd38fe
1 changed files with 19 additions and 0 deletions
|
@ -1953,6 +1953,15 @@ heightForHeaderInSection:(NSInteger)section {
|
|||
|
||||
[self.feedTitlesTable selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionMiddle];
|
||||
[self tableView:self.feedTitlesTable didSelectRowAtIndexPath:indexPath];
|
||||
|
||||
if (sender == nil) {
|
||||
FeedTableCell *cell = (FeedTableCell *)[self tableView:feedTitlesTable cellForRowAtIndexPath:indexPath];
|
||||
BOOL hasUnread = cell.positiveCount > 0 || cell.neutralCount > 0 || cell.negativeCount > 0;
|
||||
|
||||
if ([cell.reuseIdentifier isEqualToString:@"BlankCellIdentifier"] || !hasUnread) {
|
||||
[self selectNextFolderOrFeed];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)selectPreviousFeed:(id)sender {
|
||||
|
@ -2001,6 +2010,16 @@ heightForHeaderInSection:(NSInteger)section {
|
|||
if ([self.feedTitlesTable numberOfRowsInSection:section] > 0) {
|
||||
[self.feedTitlesTable scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
|
||||
}
|
||||
|
||||
if (sender == nil) {
|
||||
NSString *folderName = appDelegate.dictFoldersArray[section];
|
||||
UnreadCounts *counts = [appDelegate splitUnreadCountForFolder:folderName];
|
||||
BOOL hasUnread = counts.ps > 0 || counts.nt > 0;
|
||||
|
||||
if (!hasUnread) {
|
||||
[self selectNextFolderOrFeed];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)selectPreviousFolder:(id)sender {
|
||||
|
|
Loading…
Add table
Reference in a new issue