mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-29 19:51:08 +00:00
Fix build on visionOS
This commit is contained in:
parent
1ad4a245f3
commit
dd1a4585e0
1 changed files with 7 additions and 0 deletions
|
@ -36,7 +36,9 @@ private struct SafariRouter: ViewModifier {
|
||||||
// Open external URL (from icecubesapp://)
|
// Open external URL (from icecubesapp://)
|
||||||
guard !isSecondaryColumn else { return }
|
guard !isSecondaryColumn else { return }
|
||||||
if url.absoluteString == "icecubesapp://subclub" {
|
if url.absoluteString == "icecubesapp://subclub" {
|
||||||
|
#if !os(visionOS)
|
||||||
safariManager.dismiss()
|
safariManager.dismiss()
|
||||||
|
#endif
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let urlString = url.absoluteString.replacingOccurrences(of: AppInfo.scheme, with: "https://")
|
let urlString = url.absoluteString.replacingOccurrences(of: AppInfo.scheme, with: "https://")
|
||||||
|
@ -61,7 +63,12 @@ private struct SafariRouter: ViewModifier {
|
||||||
.init(name: "callback", value: "icecubesapp://subclub"),
|
.init(name: "callback", value: "icecubesapp://subclub"),
|
||||||
.init(name: "id", value: "@\(accountName)")
|
.init(name: "id", value: "@\(accountName)")
|
||||||
])
|
])
|
||||||
|
|
||||||
|
#if !os(visionOS)
|
||||||
return safariManager.open(newURL)
|
return safariManager.open(newURL)
|
||||||
|
#else
|
||||||
|
return .systemAction
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#if !targetEnvironment(macCatalyst)
|
#if !targetEnvironment(macCatalyst)
|
||||||
guard preferences.preferredBrowser == .inAppSafari else { return .systemAction }
|
guard preferences.preferredBrowser == .inAppSafari else { return .systemAction }
|
||||||
|
|
Loading…
Reference in a new issue