diff --git a/spinner/spinner.go b/spinner/spinner.go index d321c62b..d3b21ee0 100644 --- a/spinner/spinner.go +++ b/spinner/spinner.go @@ -254,8 +254,12 @@ func (m Model) View() string { // Tick is the command used to advance the spinner one frame. Use this command // to effectively start the spinner. -func Tick() tea.Msg { - return TickMsg{Time: time.Now()} +func (m Model) Tick() tea.Msg { + return TickMsg{ + Time: time.Now(), + id: m.id, + tag: m.tag, + } } func (m Model) tick(id, tag int) tea.Cmd { @@ -267,3 +271,11 @@ func (m Model) tick(id, tag int) tea.Cmd { } }) } + +// Tick is the command used to advance the spinner one frame. Use this command +// to effectively start the spinner. +// +// This method is deprecated. Use Model.Tick instead. +func Tick() tea.Msg { + return TickMsg{Time: time.Now()} +}