feat: send "End"-Message only once
- send "End" once, then fallback to "Idle" - update README
This commit is contained in:
parent
5bf9753dce
commit
4eedfcb965
2 changed files with 8 additions and 0 deletions
|
@ -3,6 +3,7 @@ package pomodoro
|
|||
import (
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/shared"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
var pomodoroResetChannel = make(chan bool, 1)
|
||||
|
@ -40,10 +41,16 @@ func RunPomodoro() {
|
|||
shared.Message.Mode = "End"
|
||||
}
|
||||
|
||||
time.Sleep(time.Second)
|
||||
|
||||
mu.Lock()
|
||||
shared.Message.Ongoing = false
|
||||
shared.Message.Paused = false
|
||||
mu.Unlock()
|
||||
|
||||
shared.Message.Mode = "Idle"
|
||||
shared.Message.Session = 0
|
||||
shared.Message.TimeLeft = shared.Message.PomodoroSettings.Work
|
||||
}
|
||||
|
||||
// Stops and resets the running Pomodoro
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue