diff --git a/examples/spinner/main.go b/examples/spinner/main.go index 47bf5a2..a65373e 100644 --- a/examples/spinner/main.go +++ b/examples/spinner/main.go @@ -28,7 +28,7 @@ func initialModel() model { } func (m model) Init() tea.Cmd { - return spinner.Tick + return m.spinner.Tick } func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { diff --git a/examples/spinners/main.go b/examples/spinners/main.go index fed6c5b..67d722f 100644 --- a/examples/spinners/main.go +++ b/examples/spinners/main.go @@ -44,7 +44,7 @@ type model struct { } func (m model) Init() tea.Cmd { - return spinner.Tick + return m.spinner.Tick } func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { @@ -59,14 +59,14 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.index = len(spinners) - 1 } m.resetSpinner() - return m, spinner.Tick + return m, m.spinner.Tick case "l", "right": m.index++ if m.index >= len(spinners) { m.index = 0 } m.resetSpinner() - return m, spinner.Tick + return m, m.spinner.Tick default: return m, nil }