diff --git a/internal/frontend/keyhandler.go b/internal/frontend/keyhandler.go index 0c0c322..f9c1747 100644 --- a/internal/frontend/keyhandler.go +++ b/internal/frontend/keyhandler.go @@ -20,23 +20,19 @@ func keyhandler(conn *ws.Conn, config ChronoTomato.Config, message *GoTomato.Ser case "space": if !message.Ongoing { websocket.SendCmd(conn, config.Password, "start") - return false, nil + break } if message.Paused { websocket.SendCmd(conn, config.Password, "resume") - return false, nil } else { websocket.SendCmd(conn, config.Password, "pause") - return false, nil } case "s": websocket.SendCmd(conn, config.Password, "stop") - return false, nil case "r": if config.PomodoroConfig != (GoTomato.GoTomatoPomodoroConfig{}) { websocket.Send_updateSettings(conn, config.Password, config.PomodoroConfig) } - return false, nil case "q": quit <- true return true, nil diff --git a/internal/websocket/send.go b/internal/websocket/send.go index 072ee37..dfb9769 100644 --- a/internal/websocket/send.go +++ b/internal/websocket/send.go @@ -9,7 +9,6 @@ import ( func sendClientCommand(conn *websocket.Conn, msg GoTomato.ClientCommand) { messageBytes, err := json.Marshal(msg) - if err != nil { log.Error("Error marshalling!", "reason", err) return