Move vote animation to Customize tab as persistent user setting
Replace random animation selection with a user-configurable picker on the Customize tab between Mood Style and Notifications. Confetti is the default. Selecting a style shows an inline preview that auto-plays the animation then dismisses itself. Remove Animation Lab from Settings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ struct AddMoodHeaderView: View {
|
||||
@AppStorage(UserDefaultsStore.Keys.moodImages.rawValue, store: GroupUserDefaults.groupDefaults) private var imagePack: MoodImages = .FontAwesome
|
||||
@AppStorage(UserDefaultsStore.Keys.moodTint.rawValue, store: GroupUserDefaults.groupDefaults) private var moodTint: MoodTints = .Default
|
||||
@AppStorage(UserDefaultsStore.Keys.votingLayoutStyle.rawValue, store: GroupUserDefaults.groupDefaults) private var votingLayoutStyle: Int = 0
|
||||
@AppStorage(UserDefaultsStore.Keys.celebrationAnimation.rawValue, store: GroupUserDefaults.groupDefaults) private var celebrationAnimationIndex: Int = 0
|
||||
|
||||
private var textColor: Color { theme.currentTheme.labelColor }
|
||||
|
||||
@@ -92,10 +93,10 @@ struct AddMoodHeaderView: View {
|
||||
let impactFeedback = UIImpactFeedbackGenerator(style: .medium)
|
||||
impactFeedback.impactOccurred()
|
||||
|
||||
// Store mood, date, and pick random animation
|
||||
// Store mood, date, and use saved animation preference
|
||||
celebrationMood = mood
|
||||
celebrationDate = ShowBasedOnVoteLogics.getCurrentVotingDate(onboardingData: onboardingData)
|
||||
celebrationAnimation = .random
|
||||
celebrationAnimation = CelebrationAnimationType.fromIndex(celebrationAnimationIndex)
|
||||
|
||||
// Show celebration - mood will be saved when animation completes
|
||||
withAnimation(.easeInOut(duration: 0.3)) {
|
||||
|
||||
Reference in New Issue
Block a user