mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-27 09:21:21 +01:00
Put hack in to select next unread item. WIP
This commit is contained in:
parent
68a569ec0b
commit
fe2b81b47b
@ -56,8 +56,8 @@ final class SceneModel: ObservableObject {
|
||||
/// Goes to the next unread item found in Sidebar and Timeline order, top to bottom
|
||||
func goToNextUnread() {
|
||||
if !timelineModel.goToNextUnread() {
|
||||
timelineModel.isSelectNextUnread = true
|
||||
sidebarModel.goToNextUnread()
|
||||
timelineModel.goToNextUnread()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,9 @@ class TimelineModel: ObservableObject, UndoableCommandRunner {
|
||||
}
|
||||
}
|
||||
|
||||
// I don't like this flag and feel like it is a hack. Maybe there is a better way to do this using Combine.
|
||||
var isSelectNextUnread = false
|
||||
|
||||
var undoManager: UndoManager?
|
||||
var undoableCommands = [UndoableCommand]()
|
||||
|
||||
@ -510,6 +513,12 @@ private extension TimelineModel {
|
||||
|
||||
selectedArticleIDs = Set<String>()
|
||||
selectedArticleID = nil
|
||||
|
||||
if isSelectNextUnread {
|
||||
goToNextUnread()
|
||||
isSelectNextUnread = false
|
||||
}
|
||||
|
||||
// TODO: Update unread counts and other item done in didSet on AppKit
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user