diff --git a/main.go b/main.go index 5bf6945..d855906 100644 --- a/main.go +++ b/main.go @@ -147,8 +147,6 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { // Handle timer update for each second m.remaining -= time.Second if m.remaining < 0 { - m.runCommands(m.onIntervalEnd) - if m.isFocus { // Focus period ends, switch to break m.isFocus = false @@ -162,6 +160,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { // Break ends, switch back to focus or next interval m.isFocus = true m.intervalNum++ + m.runCommands(m.onIntervalEnd) if m.intervalNum > m.intervals { // All intervals completed return m, tea.Quit