Fix next and previous buttons on Detail

This commit is contained in:
Maurice Parker 2019-09-11 09:45:48 -05:00
parent c44fcbc198
commit d8b7d603bf

View File

@ -196,14 +196,14 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
guard isPrevArticleAvailable, let articleRow = currentArticleRow else {
return nil
}
return articles[articleRow]
return articles[articleRow - 1]
}
var nextArticle: Article? {
guard isNextArticleAvailable, let articleRow = currentArticleRow else {
return nil
}
return articles[articleRow]
return articles[articleRow + 1]
}
var firstUnreadArticleIndexPath: IndexPath? {