mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 07:34:32 +00:00
Janky animation
This commit is contained in:
parent
c5186c47f8
commit
6eba9eff0b
5 changed files with 66 additions and 60 deletions
|
|
@ -129,7 +129,9 @@ class TimerManager: ObservableObject {
|
|||
timerInstance?.invalidate()
|
||||
|
||||
// Start new timer
|
||||
isTimerActive = true
|
||||
withAnimation(.smooth) {
|
||||
isTimerActive = true
|
||||
}
|
||||
isFinished = false
|
||||
isOvertime = false
|
||||
timerName = name
|
||||
|
|
@ -191,7 +193,9 @@ class TimerManager: ObservableObject {
|
|||
timerInstance?.invalidate()
|
||||
timerInstance = nil
|
||||
soundPlayer?.stop()
|
||||
isTimerActive = false
|
||||
withAnimation(.smooth) {
|
||||
isTimerActive = false
|
||||
}
|
||||
resetTimer()
|
||||
}
|
||||
|
||||
|
|
@ -236,7 +240,9 @@ class TimerManager: ObservableObject {
|
|||
}
|
||||
|
||||
private func resetTimer() {
|
||||
isTimerActive = false
|
||||
withAnimation(.smooth) {
|
||||
isTimerActive = false
|
||||
}
|
||||
timerName = "Timer"
|
||||
totalDuration = 0
|
||||
remainingTime = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue