Skip to content

Commit

Permalink
Skip a11y step for preview variants if NSDoubleLocalizedStrings is set (
Browse files Browse the repository at this point in the history
#185)

* Skip a11y step for preview variants if NSDoubleLocalizedStrings is set

* typo
  • Loading branch information
NicoHinderling authored Aug 27, 2024
1 parent 162cc21 commit 353d27a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion DemoApp/DemoApp/TestViews/PreviewVariants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 353d27a

Please sign in to comment.