Change next unread function so that it skips the current article even if that article is marked as unread
This commit is contained in:
parent
fafb7de868
commit
613cea5c7a
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue