Smoothened dismiss timer

This commit is contained in:
Hariharan Mudaliar 2025-11-28 19:33:51 +05:30
commit f9a8887879
2 changed files with 18 additions and 6 deletions

View file

@ -95,6 +95,7 @@ final class LockScreenTimerWidgetManager {
@MainActor
final class LockScreenTimerWidgetPanelManager {
static let shared = LockScreenTimerWidgetPanelManager()
static let hideAnimationDurationNanoseconds: UInt64 = 360_000_000
private var window: NSWindow?
private var hasDelegated = false
@ -120,7 +121,7 @@ final class LockScreenTimerWidgetPanelManager {
hideTask?.cancel()
animator.isPresented = false
let delay: UInt64 = animated ? 360_000_000 : 0
let delay: UInt64 = animated ? Self.hideAnimationDurationNanoseconds : 0
if delay == 0 {
window.orderOut(nil)
hideTask = nil