mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 16:54:12 +00:00
Reset the offset so that when we come back from being suspended the animation restarts
This commit is contained in:
1 parent
17f5240857
commit
10288f7969
1 file changed
+4
-1
@@ -53,11 +53,14 @@ struct RefreshProgressView: View {
|
||||
.offset(x: -Self.width * 0.6, y: 0)
|
||||
.offset(x: Self.width * 1.2 * self.offset, y: 0)
|
||||
.animation(.default.repeatForever().speed(0.265), value: self.offset)
|
||||
.onAppear{
|
||||
.onAppear {
|
||||
withAnimation {
|
||||
self.offset = 1
|
||||
}
|
||||
}
|
||||
.onDisappear {
|
||||
self.offset = 0
|
||||
}
|
||||
)
|
||||
.clipShape(Capsule())
|
||||
.frame(width: Self.width, height: Self.height)
|
||||
|
||||
Reference in new issue
Block a user