Skip to content

Commit

Permalink
🐛 (GEK): Fix DanceFreeze ending bug
Browse files Browse the repository at this point in the history
  • Loading branch information
HPezz authored and ladislas committed Dec 14, 2023
1 parent 5ac1908 commit f90f39b
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 f90f39b

Please sign in to comment.