|
|
|
|
@ -137,7 +137,7 @@ class Conductor: ObservableObject { |
|
|
|
|
DispatchQueue.main.async { |
|
|
|
|
|
|
|
|
|
let countdownId = countdown.stringId |
|
|
|
|
self._cleanupCurrentTimerIfNecessary(countdownId) |
|
|
|
|
self._cleanupPreviousTimerIfNecessary(countdownId) |
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
let start = Date() |
|
|
|
|
@ -171,11 +171,12 @@ class Conductor: ObservableObject { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fileprivate func _cleanupCurrentTimerIfNecessary(_ timerId: TimerID) { |
|
|
|
|
fileprivate func _cleanupPreviousTimerIfNecessary(_ timerId: TimerID) { |
|
|
|
|
self.removeLiveTimer(id: timerId) |
|
|
|
|
if let player = self._delayedSoundPlayers[timerId] { |
|
|
|
|
player.stop() // release resources |
|
|
|
|
} |
|
|
|
|
self._endLiveActivity(timerId: timerId) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func cancelCountdown(id: TimerID) { |
|
|
|
|
|