This commit is contained in:
Thomas Ricouard 2024-01-09 19:06:54 +01:00
parent 5c1f113c54
commit 8ea3fa73e5
3 changed files with 14 additions and 12 deletions

View file

@ -47,7 +47,6 @@ 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 {
return .systemAction
@ -57,6 +56,9 @@ private struct SafariRouter: ViewModifier {
#else
return safariManager.open(url)
#endif
#else
return .systemAction
#endif
}
}
#if !os(visionOS)

View file

@ -75,9 +75,7 @@ private struct MediaToolBar: ToolbarContent {
let data: DisplayData
var body: some ToolbarContent {
#if !targetEnvironment(macCatalyst)
DismissToolbarItem()
#endif
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)
}
}
}

View file

@ -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 {