fix: spinners spin too fast
This commit is contained in:
parent
539835627b
commit
a70ed5a372
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue