From 9c0da054fdf9b2208e4438b1d7399db2076dca7b Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 19 Jul 2020 21:06:38 -0500 Subject: [PATCH] Don't silently fail if there is no undo manager, just go ahead and mark the records --- Multiplatform/Shared/Timeline/TimelineModel.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Multiplatform/Shared/Timeline/TimelineModel.swift b/Multiplatform/Shared/Timeline/TimelineModel.swift index a5efdad4e..f9c102343 100644 --- a/Multiplatform/Shared/Timeline/TimelineModel.swift +++ b/Multiplatform/Shared/Timeline/TimelineModel.swift @@ -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) } - runCommand(markReadCommand) } func select(_ articleID: String) {