From 353d27a82e4b351343bf6a1c36c2963f84ff70ff Mon Sep 17 00:00:00 2001 From: Nico Hinderling Date: Tue, 27 Aug 2024 08:47:26 -0700 Subject: [PATCH] Skip a11y step for preview variants if NSDoubleLocalizedStrings is set (#185) * Skip a11y step for preview variants if NSDoubleLocalizedStrings is set * typo --- DemoApp/DemoApp/TestViews/PreviewVariants.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DemoApp/DemoApp/TestViews/PreviewVariants.swift b/DemoApp/DemoApp/TestViews/PreviewVariants.swift index 805cdd5..7301612 100644 --- a/DemoApp/DemoApp/TestViews/PreviewVariants.swift +++ b/DemoApp/DemoApp/TestViews/PreviewVariants.swift @@ -86,7 +86,10 @@ extension [NamedViewModifier] { /// The default named view modifiers in a ``PreviewVariants``. static var previewDefault: [NamedViewModifier] { #if os(iOS) - [.unmodified, .darkMode, .xxlTextSize, .rtl, .accessibility, .landscape] + if UserDefaults.standard.bool(forKey: "NSDoubleLocalizedStrings") { + return [.unmodified, .darkMode, .xxlTextSize, .rtl, .landscape] + } + return [.unmodified, .darkMode, .xxlTextSize, .rtl, .accessibility, .landscape] #else [.unmodified, .darkMode, .rtl] #endif