From b31c7dc257be165219b020eb17349b8c1647d991 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Wed, 29 Jan 2025 10:50:06 -0500 Subject: [PATCH] refactor: progress: return Model instead of tea.Model This conforms to the new generic bubbletea API. See https://github.com/charmbracelet/bubbletea/pull/1298 --- progress/progress.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/progress/progress.go b/progress/progress.go index b596c30c..512aaa8d 100644 --- a/progress/progress.go +++ b/progress/progress.go @@ -182,7 +182,7 @@ func New(opts ...Option) Model { } // Init exists to satisfy the tea.Model interface. -func (m Model) Init() (tea.Model, tea.Cmd) { +func (m Model) Init() (Model, tea.Cmd) { return m, nil } @@ -190,7 +190,7 @@ func (m Model) Init() (tea.Model, tea.Cmd) { // SetPercent to create the command you'll need to trigger the animation. // // If you're rendering with ViewAs you won't need this. -func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { +func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) { switch msg := msg.(type) { case FrameMsg: if msg.id != m.id || msg.tag != m.tag {