Skip to content

fix mutiple click of start while already start & rapid decreasing of …#99

Open
Soumya-Ranjan-77 wants to merge 1 commit into
sahandghavidel:mainfrom
Soumya-Ranjan-77:Error-Pomodoro
Open

fix mutiple click of start while already start & rapid decreasing of …#99
Soumya-Ranjan-77 wants to merge 1 commit into
sahandghavidel:mainfrom
Soumya-Ranjan-77:Error-Pomodoro

Conversation

@Soumya-Ranjan-77

Copy link
Copy Markdown

fix:#90

Changes Made

  • Fixed issue where clicking the Start button multiple times created multiple intervals.
  • Prevented the timer from speeding up due to duplicate setInterval() calls.
  • Updated timer state management using a running flag.
  • Fixed Stop button behavior to properly stop the timer.
  • Fixed Reset button behavior to reset the timer and allow restarting.
  • Improved timer completion handling by clearing the interval when the countdown reaches zero.

Result

The Pomodoro timer now starts only once, stops correctly, resets correctly, and maintains a consistent countdown speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants