diff --git a/QuickDrop/InfoPlist.xcstrings b/QuickDrop/InfoPlist.xcstrings index 28ad665..f08ce56 100644 --- a/QuickDrop/InfoPlist.xcstrings +++ b/QuickDrop/InfoPlist.xcstrings @@ -21,7 +21,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "QuickDrop" + "value" : "QuickDropGitHub" } } }, diff --git a/QuickDrop/View/Toast/QuickDropToastView.swift b/QuickDrop/View/Toast/QuickDropToastView.swift index 874f7b3..3849931 100644 --- a/QuickDrop/View/Toast/QuickDropToastView.swift +++ b/QuickDrop/View/Toast/QuickDropToastView.swift @@ -276,7 +276,6 @@ struct QuickDropToastHostView: View { .opacity(isVisible ? 1 : hiddenOpacity) .blur(radius: isVisible ? 0 : hiddenBlur) .animation(animation, value: receiveModel.toastIsVisible) - .animation(animation, value: receiveModel.toastDismissStyle) .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .trailing) .padding(.trailing, toastTrailingPadding) } diff --git a/QuickDrop/ViewModel/ReceiveModel.swift b/QuickDrop/ViewModel/ReceiveModel.swift index 7bc4820..04a8a72 100644 --- a/QuickDrop/ViewModel/ReceiveModel.swift +++ b/QuickDrop/ViewModel/ReceiveModel.swift @@ -431,7 +431,7 @@ class ReceiveModel: ObservableObject, InboundAppDelegate { // MARK: - macOS Progress Overlay #if os(macOS) - private func scheduleToastReveal(for window: NSWindow, delay: TimeInterval = 0.1) { + private func scheduleToastReveal(for window: NSWindow) { toastRevealTask?.cancel() toastRevealTask = nil @@ -443,7 +443,8 @@ class ReceiveModel: ObservableObject, InboundAppDelegate { } toastRevealTask = revealTask - DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: revealTask) + // Reveal on the next run-loop tick to avoid pop-in without timer jitter. + DispatchQueue.main.async(execute: revealTask) } func showQuickDropToast(for connectionID: String) { @@ -461,10 +462,10 @@ class ReceiveModel: ObservableObject, InboundAppDelegate { toastRevealTask = nil if let window = toastWindow { - window.makeKeyAndOrderFront(nil) toastDismissStyle = .slide if !toastIsVisible { + window.makeKeyAndOrderFront(nil) scheduleToastReveal(for: window) } return