Don't silently fail if there is no undo manager, just go ahead and mark the records
This commit is contained in:
parent
6853535b96
commit
9c0da054fd
|
@ -390,10 +390,11 @@ private extension TimelineModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
func markArticlesWithUndo(_ articles: [Article], statusKey: ArticleStatus.Key, flag: Bool) {
|
func markArticlesWithUndo(_ articles: [Article], statusKey: ArticleStatus.Key, flag: Bool) {
|
||||||
guard let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: articles, statusKey: statusKey, flag: flag, undoManager: undoManager) else {
|
if let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: articles, statusKey: statusKey, flag: flag, undoManager: undoManager) {
|
||||||
return
|
|
||||||
}
|
|
||||||
runCommand(markReadCommand)
|
runCommand(markReadCommand)
|
||||||
|
} else {
|
||||||
|
markArticles(Set(articles), statusKey: statusKey, flag: flag)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func select(_ articleID: String) {
|
func select(_ articleID: String) {
|
||||||
|
|
Loading…
Reference in New Issue