Janky animation

This commit is contained in:
Hariharan Mudaliar 2025-11-11 12:36:55 +05:30
commit 29b9f7b460
7 changed files with 311 additions and 9 deletions

View file

@ -331,7 +331,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
// Use minimalistic or normal size based on settings
let baseSize = Defaults[.enableMinimalisticUI] ? minimalisticOpenNotchSize : openNotchSize
var baseSize = Defaults[.enableMinimalisticUI] ? minimalisticOpenNotchSize : openNotchSize
if Defaults[.enableMinimalisticUI] && vm.notchState == .open {
let reminderCount = ReminderLiveActivityManager.shared.activeWindowReminders.count
let extraHeight = ReminderLiveActivityManager.additionalHeight(forRowCount: reminderCount)
baseSize.height += extraHeight
}
// Only apply dynamic sizing when on stats tab and stats are enabled
guard coordinator.currentView == .stats && Defaults[.enableStatsFeature] else {
@ -417,6 +423,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
self?.debouncedUpdateWindowSize()
}.store(in: &cancellables)
ReminderLiveActivityManager.shared.$activeWindowReminders
.receive(on: RunLoop.main)
.sink { [weak self] _ in
self?.debouncedUpdateWindowSize()
}
.store(in: &cancellables)
Defaults.publisher(.enableShortcuts, options: []).sink { change in
KeyboardShortcuts.isEnabled = change.newValue
}.store(in: &cancellables)