fix: spinners spin too fast

This commit is contained in:
juancwu 2026-01-26 18:51:35 +00:00
commit a70ed5a372
2 changed files with 3 additions and 3 deletions

View file

@ -79,7 +79,7 @@ func (m RetrieveModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if msg.String() == "enter" {
m.loading = true
m.records = nil
return m, retrieveRecords(m.client, m.textinput.Value())
return m, tea.Batch(retrieveRecords(m.client, m.textinput.Value()), m.spinner.Tick)
}
if len(m.records) > 0 {
@ -107,7 +107,7 @@ func (m RetrieveModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if m.loading {
m.spinner, cmd = m.spinner.Update(msg)
return m, tea.Batch(cmd, m.spinner.Tick)
return m, cmd
}
return m, textinput.Blink