mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Things work - but animation is still janky
This commit is contained in:
parent
29b9f7b460
commit
ba27aa3d0f
4 changed files with 114 additions and 74 deletions
|
|
@ -65,10 +65,7 @@ struct MinimalisticMusicPlayerView: View {
|
|||
playbackControls
|
||||
.padding(.top, 4)
|
||||
|
||||
if shouldShowReminderList {
|
||||
MinimalisticReminderEventListView(reminders: reminderEntries, currentDate: reminderManager.currentDate)
|
||||
.transition(.opacity.combined(with: .move(edge: .bottom)))
|
||||
}
|
||||
reminderList
|
||||
}
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.top, -15)
|
||||
|
|
@ -83,6 +80,18 @@ struct MinimalisticMusicPlayerView: View {
|
|||
private var shouldShowReminderList: Bool {
|
||||
enableReminderLiveActivity && !reminderEntries.isEmpty
|
||||
}
|
||||
|
||||
private var reminderListHeight: CGFloat {
|
||||
ReminderLiveActivityManager.additionalHeight(forRowCount: reminderEntries.count)
|
||||
}
|
||||
|
||||
private var reminderList: some View {
|
||||
MinimalisticReminderEventListView(reminders: reminderEntries, currentDate: reminderManager.currentDate)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.frame(height: reminderListHeight, alignment: .top)
|
||||
.opacity(shouldShowReminderList ? 1 : 0)
|
||||
.animation(.easeInOut(duration: 0.18), value: shouldShowReminderList)
|
||||
}
|
||||
|
||||
|
||||
private struct MinimalisticReminderEventListView: View {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue