Fix text on iOS 14 where markdown isn't available

This commit is contained in:
Callum Yarnold 2022-05-25 19:59:06 +01:00
parent 224177e065
commit fb3c542264
No known key found for this signature in database
GPG key ID: 1B309601199B0473
2 changed files with 16 additions and 4 deletions

View file

@ -144,8 +144,14 @@ struct NotificationListView: View {
.foregroundColor(.gray)
.multilineTextAlignment(.center)
.padding(.bottom)
Text("To send notifications to this topic, simply PUT or POST to the topic URL.\n\nExample:\n`$ curl -d \"hi\" ntfy.sh/\(subscription.topicName())`\n\nDetailed instructions are available on [ntfy.sh](https;//ntfy.sh) and [in the docs](https:ntfy.sh/docs).")
.foregroundColor(.gray)
if #available(iOS 15.0, *) {
Text("To send notifications to this topic, simply PUT or POST to the topic URL.\n\nExample:\n`$ curl -d \"hi\" ntfy.sh/\(subscription.topicName())`\n\nDetailed instructions are available on [ntfy.sh](https://ntfy.sh) and [in the docs](https://ntfy.sh/docs).")
.foregroundColor(.gray)
} else {
Text("To send notifications to this topic, simply PUT or POST to the topic URL.\n\nExample:\n`$ curl -d \"hi\" ntfy.sh/\(subscription.topicName())`\n\nDetailed instructions are available on https://ntfy.sh and https://ntfy.sh/docs.")
.foregroundColor(.gray)
}
}
.padding(40)
}

View file

@ -66,8 +66,14 @@ struct SubscriptionListView: View {
.foregroundColor(.gray)
.multilineTextAlignment(.center)
.padding(.bottom)
Text("Click the + to create or subscribe to a topic. Afterwards, you receive notifications on your device when sending messages via PUT or POST.\n\nDetailed instructions are available on [ntfy.sh](https;//ntfy.sh) and [in the docs](https:ntfy.sh/docs).")
.foregroundColor(.gray)
if #available(iOS 15.0, *) {
Text("Click the + to create or subscribe to a topic. Afterwards, you receive notifications on your device when sending messages via PUT or POST.\n\nDetailed instructions are available on [ntfy.sh](https://ntfy.sh) and [in the docs](https://ntfy.sh/docs).")
.foregroundColor(.gray)
} else {
Text("Click the + to create or subscribe to a topic. Afterwards, you receive notifications on your device when sending messages via PUT or POST.\n\nDetailed instructions are available on https://ntfy.sh and https://ntfy.sh/docs")
.foregroundColor(.gray)
}
}
.padding(40)
}