feat: simplify pomodoro functions by removing client parameter

- remove clients parameter from RunPomodoro function
- update startTimer to no longer require clients parameter
- modify ResetPomodoro to eliminate clients parameter
- adjust client_commands to reflect changes in function signatures

🤖
This commit is contained in:
Sebastian Mark 2024-10-21 08:39:39 +02:00
parent 9615d4d449
commit 234f3c17dc
3 changed files with 8 additions and 11 deletions

View file

@ -43,11 +43,11 @@ func handleClientCommands(ws *websocket.Conn) {
if clientCommand.Config != unsetPomodoroConfig {
pomodoroConfig = clientCommand.Config
}
go pomodoro.RunPomodoro(broadcast.Clients, pomodoroConfig) // Start the timer with the list of clients
go pomodoro.RunPomodoro(pomodoroConfig) // Start the timer with the list of clients
}
case "stop":
if pomodoro.IsPomodoroOngoing() {
pomodoro.ResetPomodoro(broadcast.Clients) // Reset Pomodoro
pomodoro.ResetPomodoro() // Reset Pomodoro
}
case "pause":
if pomodoro.IsPomodoroOngoing() && !pomodoro.IsPomodoroPaused() {