mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 15:44:32 +00:00
Janky animation
This commit is contained in:
parent
4b7a54f46f
commit
29b9f7b460
7 changed files with 311 additions and 9 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue