From c4623473ed11ead90ac7db43eb92146034fbce60 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sat, 17 Sep 2022 13:26:59 -0500 Subject: [PATCH] Fix typo that would cause the current theme to be set to default when cold launching --- iOS/Article/ArticleViewController.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/iOS/Article/ArticleViewController.swift b/iOS/Article/ArticleViewController.swift index 9a989cb14..43a376e47 100644 --- a/iOS/Article/ArticleViewController.swift +++ b/iOS/Article/ArticleViewController.swift @@ -265,9 +265,15 @@ class ArticleViewController: UIViewController, MainControllerIdentifiable { themeActions.append(action) } - let defaultThemeAction = UIAction(title: NSLocalizedString("Default", comment: "Default"), image: nil, identifier: nil, discoverabilityTitle: nil, attributes: [], state: ArticleThemesManager.shared.currentThemeName == AppDefaults.defaultThemeName ? .on : .off) { _ in + let defaultThemeAction = UIAction(title: NSLocalizedString("Default", comment: "Default"), + image: nil, + identifier: nil, + discoverabilityTitle: nil, + attributes: [], + state: ArticleThemesManager.shared.currentThemeName == AppDefaults.defaultThemeName ? .on : .off, + handler: { _ in ArticleThemesManager.shared.currentThemeName = AppDefaults.defaultThemeName - } + }) let defaultThemeMenu = UIMenu(title: "", image: nil, identifier: nil, options: .displayInline, children: [defaultThemeAction]) let customThemeMenu = UIMenu(title: "", image: nil, identifier: nil, options: .displayInline, children: themeActions)