mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-29 03:31:02 +00:00
Fix #1851 (both)
This commit is contained in:
parent
5c1f113c54
commit
8ea3fa73e5
3 changed files with 14 additions and 12 deletions
|
@ -47,15 +47,17 @@ private struct SafariRouter: ViewModifier {
|
|||
}
|
||||
#if !targetEnvironment(macCatalyst)
|
||||
guard preferences.preferredBrowser == .inAppSafari else { return .systemAction }
|
||||
#endif
|
||||
// SFSafariViewController only supports initial URLs with http:// or https:// schemes.
|
||||
guard let scheme = url.scheme, ["https", "http"].contains(scheme.lowercased()) else {
|
||||
// SFSafariViewController only supports initial URLs with http:// or https:// schemes.
|
||||
guard let scheme = url.scheme, ["https", "http"].contains(scheme.lowercased()) else {
|
||||
return .systemAction
|
||||
}
|
||||
#if os(visionOS)
|
||||
return .systemAction
|
||||
}
|
||||
#if os(visionOS)
|
||||
return .systemAction
|
||||
#else
|
||||
return safariManager.open(url)
|
||||
#endif
|
||||
#else
|
||||
return safariManager.open(url)
|
||||
return .systemAction
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,9 +75,7 @@ private struct MediaToolBar: ToolbarContent {
|
|||
let data: DisplayData
|
||||
|
||||
var body: some ToolbarContent {
|
||||
#if !targetEnvironment(macCatalyst)
|
||||
DismissToolbarItem()
|
||||
#endif
|
||||
DismissToolbarItem()
|
||||
QuickLookToolbarItem(itemUrl: data.url)
|
||||
AltTextToolbarItem(alt: data.description)
|
||||
SavePhotoToolbarItem(url: data.url, type: data.type)
|
||||
|
@ -95,6 +93,8 @@ private struct DismissToolbarItem: ToolbarContent {
|
|||
} label: {
|
||||
Image(systemName: "xmark.circle")
|
||||
}
|
||||
.opacity(0)
|
||||
.keyboardShortcut(.cancelAction)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -228,12 +228,12 @@ extension StatusEditor {
|
|||
postingTimer = nil
|
||||
|
||||
if let postStatus {
|
||||
StreamWatcher.shared.emmitEditEvent(for: postStatus)
|
||||
HapticManager.shared.fireHaptic(.notification(.success))
|
||||
withAnimation {
|
||||
postingProgress = 99.0
|
||||
}
|
||||
try await Task.sleep(for: .seconds(0.5))
|
||||
StreamWatcher.shared.emmitEditEvent(for: postStatus)
|
||||
HapticManager.shared.fireHaptic(.notification(.success))
|
||||
}
|
||||
|
||||
if hasExplicitlySelectedLanguage, let selectedLanguage {
|
||||
|
|
Loading…
Reference in a new issue