Skip to content

Commit

Permalink
🔀 Merge branch 'hugo/feature/Fix-DanceFreeze-ending-issue'
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Dec 14, 2023
2 parents 5ac1908 + f90f39b commit 9a82cef
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ extension DanceFreeze {
}

func randomSwitch() {
guard self.viewModel.exercicesSharedData.state != .completed else { return }
if self.viewModel.progress < 1.0, self.viewModel.exercicesSharedData.state != .completed {
let rand = Double.random(in: 2..<10)

DispatchQueue.main.asyncAfter(deadline: .now() + rand) {
guard self.viewModel.exercicesSharedData.state != .completed else { return }
self.viewModel.onDanceFreezeToggle()
self.randomSwitch()
}
Expand Down

0 comments on commit 9a82cef

Please sign in to comment.