fixes the end-of-timer-chime being played continiously

This commit is contained in:
2024-12-17 21:29:54 +01:00
parent 2a1a68e969
commit e2232af098

View File

@@ -83,11 +83,12 @@ export class FocusPage implements OnInit, OnDestroy {
clearInterval(this.interval); clearInterval(this.interval);
this.timerStarted = null; this.timerStarted = null;
} }
else { else if (progress === 1) {
this.endOfTimerChime.play().catch(error => { this.endOfTimerChime.play().catch(error => {
console.error('Error playing audio:', error); console.error('Error playing audio:', error);
}); });
} }
progress = 1;
} }
this.renderer.setStyle( this.renderer.setStyle(