Don't silently fail if there is no undo manager, just go ahead and mark the records

This commit is contained in:
Maurice Parker 2020-07-19 21:06:38 -05:00
parent 6853535b96
commit 9c0da054fd
1 changed files with 4 additions and 3 deletions

View File

@ -390,10 +390,11 @@ private extension TimelineModel {
}
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 {
return
}
if let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: articles, statusKey: statusKey, flag: flag, undoManager: undoManager) {
runCommand(markReadCommand)
} else {
markArticles(Set(articles), statusKey: statusKey, flag: flag)
}
}
func select(_ articleID: String) {