mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-09 08:39:00 +01:00
Fix next unread and first unread timeline animations
This commit is contained in:
parent
ba8d1dfa83
commit
7e30bba16a
@ -102,7 +102,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
|||||||
}
|
}
|
||||||
|
|
||||||
@IBAction func firstUnread(_ sender: Any) {
|
@IBAction func firstUnread(_ sender: Any) {
|
||||||
coordinator.selectNextUnread()
|
coordinator.selectFirstUnread()
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: Keyboard shortcuts
|
// MARK: Keyboard shortcuts
|
||||||
|
@ -1173,7 +1173,7 @@ private extension SceneCoordinator {
|
|||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
func selectFirstUnreadArticleInTimeline() -> Bool {
|
func selectFirstUnreadArticleInTimeline() -> Bool {
|
||||||
return selectNextArticleInTimeline(startingRow: 0)
|
return selectNextArticleInTimeline(startingRow: 0, animated: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
@ -1186,10 +1186,10 @@ private extension SceneCoordinator {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
return selectNextArticleInTimeline(startingRow: startingRow)
|
return selectNextArticleInTimeline(startingRow: startingRow, animated: false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func selectNextArticleInTimeline(startingRow: Int) -> Bool {
|
func selectNextArticleInTimeline(startingRow: Int, animated: Bool) -> Bool {
|
||||||
|
|
||||||
guard startingRow < articles.count else {
|
guard startingRow < articles.count else {
|
||||||
return false
|
return false
|
||||||
@ -1198,7 +1198,7 @@ private extension SceneCoordinator {
|
|||||||
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 {
|
||||||
selectArticle(article, animated: true)
|
selectArticle(article, animated: animated)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user