mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
BugFix: Janky Animation in the calendar view
This commit is contained in:
parent
4f82ce417e
commit
c34cdfc864
6 changed files with 31 additions and 30 deletions
|
|
@ -45,7 +45,6 @@ class DynamicIslandViewModel: NSObject, ObservableObject {
|
|||
|
||||
@Published var notchSize: CGSize = getClosedNotchSize()
|
||||
@Published var closedNotchSize: CGSize = getClosedNotchSize()
|
||||
private var minimalisticReminderRowCount: Int = 0
|
||||
|
||||
deinit {
|
||||
destroy()
|
||||
|
|
@ -77,9 +76,8 @@ class DynamicIslandViewModel: NSObject, ObservableObject {
|
|||
ReminderLiveActivityManager.shared.$activeWindowReminders
|
||||
.removeDuplicates()
|
||||
.receive(on: RunLoop.main)
|
||||
.sink { [weak self] entries in
|
||||
.sink { [weak self] _ in
|
||||
guard let self else { return }
|
||||
self.minimalisticReminderRowCount = entries.count
|
||||
let updatedTarget = self.calculateDynamicNotchSize()
|
||||
guard self.notchState == .open else { return }
|
||||
guard self.notchSize != updatedTarget else { return }
|
||||
|
|
@ -195,11 +193,6 @@ class DynamicIslandViewModel: NSObject, ObservableObject {
|
|||
// Use minimalistic size if minimalistic UI is enabled
|
||||
var baseSize = Defaults[.enableMinimalisticUI] ? minimalisticOpenNotchSize : openNotchSize
|
||||
|
||||
if Defaults[.enableMinimalisticUI] {
|
||||
let extraHeight = ReminderLiveActivityManager.additionalHeight(forRowCount: minimalisticReminderRowCount)
|
||||
baseSize.height += extraHeight
|
||||
}
|
||||
|
||||
// Only apply dynamic sizing when on stats tab and stats are enabled
|
||||
guard DynamicIslandViewCoordinator.shared.currentView == .stats && Defaults[.enableStatsFeature] else {
|
||||
return baseSize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue