mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-22 23:58:36 +01:00
Merge branch 'mac-release' into main
This commit is contained in:
commit
77dd2e5e22
@ -397,8 +397,9 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
}
|
||||
|
||||
@IBAction func markAllAsReadAndGoToNextUnread(_ sender: Any?) {
|
||||
markAllAsRead(sender)
|
||||
nextUnread(sender)
|
||||
currentTimelineViewController?.markAllAsRead() {
|
||||
self.nextUnread(sender)
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func markUnreadAndGoToNextUnread(_ sender: Any?) {
|
||||
|
@ -233,8 +233,8 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
|
||||
// MARK: - API
|
||||
|
||||
func markAllAsRead() {
|
||||
guard let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: articles, markingRead: true, undoManager: undoManager) else {
|
||||
func markAllAsRead(completion: (() -> Void)? = nil) {
|
||||
guard let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: articles, markingRead: true, undoManager: undoManager, completion: completion) else {
|
||||
return
|
||||
}
|
||||
runCommand(markReadCommand)
|
||||
|
@ -41,12 +41,12 @@ final class MarkStatusCommand: UndoableCommand {
|
||||
self.redoActionName = actionName
|
||||
}
|
||||
|
||||
convenience init?(initialArticles: [Article], markingRead: Bool, undoManager: UndoManager) {
|
||||
self.init(initialArticles: initialArticles, statusKey: .read, flag: markingRead, undoManager: undoManager)
|
||||
convenience init?(initialArticles: [Article], markingRead: Bool, undoManager: UndoManager, completion: (() -> Void)? = nil) {
|
||||
self.init(initialArticles: initialArticles, statusKey: .read, flag: markingRead, undoManager: undoManager, completion: completion)
|
||||
}
|
||||
|
||||
convenience init?(initialArticles: [Article], markingStarred: Bool, undoManager: UndoManager) {
|
||||
self.init(initialArticles: initialArticles, statusKey: .starred, flag: markingStarred, undoManager: undoManager)
|
||||
convenience init?(initialArticles: [Article], markingStarred: Bool, undoManager: UndoManager, completion: (() -> Void)? = nil) {
|
||||
self.init(initialArticles: initialArticles, statusKey: .starred, flag: markingStarred, undoManager: undoManager, completion: completion)
|
||||
}
|
||||
|
||||
func perform() {
|
||||
|
Loading…
Reference in New Issue
Block a user