mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
Update animated progress bar example per its current API
This commit is contained in:
@@ -70,8 +70,8 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
|
||||
// FrameMsg is sent when the progress bar wants to animate itself
|
||||
case progress.FrameMsg:
|
||||
var cmd tea.Cmd
|
||||
m.progress, cmd = m.progress.Update(msg)
|
||||
progressModel, cmd := m.progress.Update(msg)
|
||||
m.progress = progressModel.(progress.Model)
|
||||
return m, cmd
|
||||
|
||||
default:
|
||||
@@ -87,7 +87,7 @@ func (e model) View() string {
|
||||
}
|
||||
|
||||
func tickCmd() tea.Cmd {
|
||||
return tea.Tick(time.Second*2, func(t time.Time) tea.Msg {
|
||||
return tea.Tick(time.Second*1, func(t time.Time) tea.Msg {
|
||||
return tickMsg(t)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user