mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
hotfix use custom url scheme to open links if provided
This commit is contained in:
@@ -86,7 +86,7 @@ class AuthenticationLoginViewModel: AuthenticationLoginViewModelType, Authentica
|
||||
message: BWIL10n.bwiDeprecatedVersionWarningMessage,
|
||||
primaryButton: (BWIL10n.bwiDeprecatedVersionAppstoreButton, {
|
||||
|
||||
UIApplication.shared.open(URL(string: BWIBuildSettings.shared.itunesAppLink)!)
|
||||
UIApplication.shared.vc_open(URL(string: BWIBuildSettings.shared.itunesAppLink)!, completionHandler: nil)
|
||||
}),
|
||||
secondaryButton: (VectorL10n.ok, {}))
|
||||
|
||||
|
||||
@@ -218,9 +218,8 @@ struct AuthenticationLoginScreen: View {
|
||||
return
|
||||
}
|
||||
let tosURL = URL.init(string: urlString)! // add your link here
|
||||
if UIApplication.shared.canOpenURL(tosURL) {
|
||||
UIApplication.shared.open(tosURL)
|
||||
}
|
||||
|
||||
UIApplication.shared.vc_open(tosURL, completionHandler: nil)
|
||||
}, label: {
|
||||
Text(BWIL10n.authenticationDataprivacyText)
|
||||
.font(theme.fonts.footnote)
|
||||
|
||||
@@ -130,7 +130,7 @@ final class AuthenticationServerSelectionCoordinator: Coordinator, Presentable {
|
||||
stopLoading()
|
||||
let primaryButtonCompletion: (() -> Void)? = { () in
|
||||
if let url = URL(string: BWIBuildSettings.shared.bumAdvertizementURLString) {
|
||||
UIApplication.shared.open(url)
|
||||
UIApplication.shared.vc_open(url, completionHandler: nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ struct AuthenticationServerSelectionScreen: View {
|
||||
return Alert(
|
||||
title: Text(BWIL10n.authenticationServerSelectionServerDeniedTitle),
|
||||
message: Text(BWIL10n.authenticationServerSelectionServerDeniedMessage),
|
||||
primaryButton: .default(Text(BWIL10n.authenticationServerSelectionServerDeniedAdvertizementWebsiteButton), action: {UIApplication.shared.open(url)}),
|
||||
primaryButton: .default(Text(BWIL10n.authenticationServerSelectionServerDeniedAdvertizementWebsiteButton), action: {UIApplication.shared.vc_open(url, completionHandler: nil)}),
|
||||
secondaryButton: .default(Text(VectorL10n.ok)))
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user