From 721bb9abf510378178cabb3c4d142f5e116fccd4 Mon Sep 17 00:00:00 2001 From: Swift Date: Sat, 4 Mar 2023 19:19:35 -0500 Subject: [PATCH] Make shaka animation smoother Changelog-Changed: Make shaka animation smoother Closes: #734 --- damus/Views/ActionBar/EventActionBar.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/damus/Views/ActionBar/EventActionBar.swift b/damus/Views/ActionBar/EventActionBar.swift index 6e569e89..b90e9112 100644 --- a/damus/Views/ActionBar/EventActionBar.swift +++ b/damus/Views/ActionBar/EventActionBar.swift @@ -169,7 +169,7 @@ struct LikeButton: View { @Environment(\.colorScheme) var colorScheme // Following four are Shaka animation properties - let timer = Timer.publish(every: 0.05, on: .main, in: .common).autoconnect() + let timer = Timer.publish(every: 0.10, on: .main, in: .common).autoconnect() @State private var shouldAnimate = false @State private var rotationAngle = 0.0 @State private var amountOfAngleIncrease: Double = 0.0 @@ -197,9 +197,9 @@ struct LikeButton: View { } amountOfAngleIncrease = -amountOfAngleIncrease if amountOfAngleIncrease < 0 { - amountOfAngleIncrease += 5 + amountOfAngleIncrease += 2.5 } else { - amountOfAngleIncrease -= 5 + amountOfAngleIncrease -= 2.5 } } }