Apply DevModeView suggestion

This commit is contained in:
naturecodevoid
2023-04-06 20:49:49 -07:00
parent df94e79472
commit 92a9650c0c
2 changed files with 6 additions and 8 deletions

View File

@@ -36,15 +36,13 @@ struct DevModePrompt: View {
.disabled(countdown > 0)
}
@ViewBuilder
var text: some View {
if #available(iOS 15.0, *) {
do {
return Text(try AttributedString(markdown: L10n.DevModeView.prompt, options: AttributedString.MarkdownParsingOptions(interpretedSyntax: .inlineOnlyPreservingWhitespace)))
} catch {
return Text(L10n.DevModeView.prompt)
}
if #available(iOS 15.0, *),
let string = try? AttributedString(markdown: L10n.DevModeView.prompt, options: AttributedString.MarkdownParsingOptions(interpretedSyntax: .inlineOnlyPreservingWhitespace)) {
Text(string)
} else {
return Text(L10n.DevModeView.prompt)
Text(L10n.DevModeView.prompt)
}
}