Redesign haptic patterns per animation and play on selection
Rewrite all 10 celebration haptic patterns to match visual timing and feel distinct: confetti gets playful falling taps, explosion gets a deep boom, shatter gets glassy cracks, morph gets liquid breathing, etc. Play the matching haptic when selecting a new vote animation in customization (respects haptic feedback toggle). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -495,6 +495,7 @@ struct CelebrationAnimationPickerCompact: View {
|
||||
@AppStorage(UserDefaultsStore.Keys.celebrationAnimation.rawValue, store: GroupUserDefaults.groupDefaults) private var celebrationAnimationIndex: Int = 0
|
||||
@AppStorage(UserDefaultsStore.Keys.moodTint.rawValue, store: GroupUserDefaults.groupDefaults) private var moodTint: MoodTints = .Default
|
||||
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
|
||||
@AppStorage(UserDefaultsStore.Keys.hapticFeedbackEnabled.rawValue, store: GroupUserDefaults.groupDefaults) private var hapticFeedbackEnabled = true
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
|
||||
// Preview state
|
||||
@@ -586,6 +587,9 @@ struct CelebrationAnimationPickerCompact: View {
|
||||
Task { @MainActor in
|
||||
try? await Task.sleep(for: .seconds(0.5))
|
||||
guard previewAnimation == animation else { return }
|
||||
if hapticFeedbackEnabled {
|
||||
HapticFeedbackManager.shared.play(for: animation)
|
||||
}
|
||||
withAnimation(.easeInOut(duration: 0.3)) {
|
||||
showPreviewCelebration = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user