fix(timer): stop should return cmd (#138)

This commit is contained in:
Pablo Díaz-López 2022-07-01 16:36:12 +02:00 committed by GitHub
parent 2fd583c8ef
commit 4c1762413a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,9 +162,7 @@ func (m *Model) Start() tea.Cmd {
// Stop pauses the timer. Has no effect if the timer has timed out. // Stop pauses the timer. Has no effect if the timer has timed out.
func (m *Model) Stop() tea.Cmd { func (m *Model) Stop() tea.Cmd {
return func() tea.Msg { return m.startStop(false)
return m.startStop(false)
}
} }
// Toggle stops the timer if it's running and starts it if it's stopped. // Toggle stops the timer if it's running and starts it if it's stopped.