refactor: rename RunPomodoroTimer() to RunPomodoro()

🤖
This commit is contained in:
Sebastian Mark 2024-10-20 22:00:54 +02:00
parent 337e5b0ed3
commit f098c1f6bf
2 changed files with 3 additions and 3 deletions

View file

@ -23,8 +23,8 @@ var pomodoroResumeChannel = make(chan bool, 1)
var mu sync.Mutex // to synchronize access to shared state var mu sync.Mutex // to synchronize access to shared state
// RunPomodoroTimer iterates the Pomodoro work/break sessions. // RunPomodoro iterates the Pomodoro work/break sessions.
func RunPomodoroTimer(clients map[*websocket.Conn]*models.Client) { func RunPomodoro(clients map[*websocket.Conn]*models.Client) {
mu.Lock() mu.Lock()
pomodoroOngoing = true pomodoroOngoing = true
pomodoroPaused = false pomodoroPaused = false

View file

@ -30,7 +30,7 @@ func handleClientCommands(ws *websocket.Conn) {
switch command.Command { switch command.Command {
case "start": case "start":
if !pomodoro.IsPomodoroOngoing() { if !pomodoro.IsPomodoroOngoing() {
go pomodoro.RunPomodoroTimer(Clients) // Start the timer with the list of clients go pomodoro.RunPomodoro(Clients) // Start the timer with the list of clients
} }
case "stop": case "stop":
if pomodoro.IsPomodoroOngoing() { if pomodoro.IsPomodoroOngoing() {