Change next unread function so that it skips the current article even if that article is marked as unread

This commit is contained in:
Maurice Parker 2019-09-02 17:24:20 -05:00
parent fafb7de868
commit 613cea5c7a
1 changed files with 5 additions and 1 deletions

View File

@ -879,7 +879,7 @@ private extension SceneCoordinator {
func selectNextUnreadArticleInTimeline() -> Bool { func selectNextUnreadArticleInTimeline() -> Bool {
let startingRow: Int = { let startingRow: Int = {
if let indexPath = currentArticleIndexPath { if let indexPath = currentArticleIndexPath {
return indexPath.row return indexPath.row + 1
} else { } else {
return 0 return 0
} }
@ -890,6 +890,10 @@ private extension SceneCoordinator {
func selectArticleInTimeline(startingRow: Int) -> Bool { func selectArticleInTimeline(startingRow: Int) -> Bool {
guard startingRow < articles.count else {
return false
}
for i in startingRow..<articles.count { for i in startingRow..<articles.count {
let article = articles[i] let article = articles[i]
if !article.status.read { if !article.status.read {