feat: update variable and function name for started pomodoro
- change variable name from pomodoroRunning to pomodoroOngoing
- update function name from IsPomodoroRunning to IsPomodoroOngoing
- modify client command checks to use IsPomodoroActive instead of IsPomodoroRunning
🤖
This commit is contained in:
parent
b71d04aad2
commit
b46d2469d3
2 changed files with 10 additions and 10 deletions
|
@ -34,19 +34,19 @@ func handleClientCommands(ws *websocket.Conn) {
|
|||
// Process the command
|
||||
switch command.Command {
|
||||
case "start":
|
||||
if !pomodoro.IsPomodoroRunning() {
|
||||
if !pomodoro.IsPomodoroOngoing() {
|
||||
go pomodoro.RunPomodoroTimer(Clients) // Start the timer with the list of clients
|
||||
}
|
||||
case "stop":
|
||||
if pomodoro.IsPomodoroRunning() {
|
||||
if pomodoro.IsPomodoroOngoing() {
|
||||
pomodoro.ResetPomodoro(Clients) // Reset Pomodoro
|
||||
}
|
||||
case "pause":
|
||||
if pomodoro.IsPomodoroRunning() && !pomodoro.IsPomodoroPaused() {
|
||||
if pomodoro.IsPomodoroOngoing() && !pomodoro.IsPomodoroPaused() {
|
||||
pomodoro.PausePomodoro() // Pause the timer
|
||||
}
|
||||
case "resume":
|
||||
if pomodoro.IsPomodoroRunning() && pomodoro.IsPomodoroPaused() {
|
||||
if pomodoro.IsPomodoroOngoing() && pomodoro.IsPomodoroPaused() {
|
||||
pomodoro.ResumePomodoro() // Resume the timer
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue