feat: update timer management

- rename timerRunning to pomodoroRunning
- move function and timer definition to correct source file

🤖
This commit is contained in:
Sebastian Mark 2024-10-19 18:05:10 +02:00
parent 90f80cc685
commit c9501c3bbb
3 changed files with 10 additions and 10 deletions

View file

@ -29,11 +29,11 @@ func handleClientCommands(ws *websocket.Conn) {
// Process the command
switch command.Command {
case "start":
if !pomodoro.IsTimerRunning() {
if !pomodoro.IsPomodoroRunning() {
go pomodoro.RunPomodoroTimer(Clients) // Start the timer with the list of clients
}
case "stop":
if pomodoro.IsTimerRunning() {
if pomodoro.IsPomodoroRunning() {
pomodoro.StopTimer() // Stop the timer in the Pomodoro package
}
}