commit 721bb9abf510378178cabb3c4d142f5e116fccd4
parent 89bb293acd2480e1f670ed2625452e0ed8773e6c
Author: Swift <scoder1747@gmail.com>
Date: Sat, 4 Mar 2023 19:19:35 -0500
Make shaka animation smoother
Changelog-Changed: Make shaka animation smoother
Closes: #734
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git 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
}
}
}