Skip to content

Commit

Permalink
Fix N key : selection of last unread article when no article is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
barijaona committed Jun 4, 2016
1 parent 07975ea commit 105dd36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ArticleController.m
Expand Up @@ -385,7 +385,8 @@ -(void)displayNextUnread
if (![mainArticleView viewNextUnreadInFolder])
{
// If nothing found, search if we have fresher articles from same folder
if ([[Database sharedManager] countOfUnread] > 1 && (![mainArticleView selectFirstUnreadInFolder] || self.selectedArticle == currentArticle))
if ( [[Database sharedManager] countOfUnread] > 0
&& (currentArticle == nil || ![mainArticleView selectFirstUnreadInFolder] || self.selectedArticle == currentArticle) )
{
// If nothing unread found in current folder, try other folders
NSInteger nextFolderWithUnread = [foldersTree nextFolderWithUnread:currentFolderId];
Expand Down

0 comments on commit 105dd36

Please sign in to comment.