Skip to content

Commit b31c7dc

Browse files
committed
refactor: progress: return Model instead of tea.Model
This conforms to the new generic bubbletea API. See charmbracelet/bubbletea#1298
1 parent 421843b commit b31c7dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

progress/progress.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ func New(opts ...Option) Model {
182182
}
183183

184184
// Init exists to satisfy the tea.Model interface.
185-
func (m Model) Init() (tea.Model, tea.Cmd) {
185+
func (m Model) Init() (Model, tea.Cmd) {
186186
return m, nil
187187
}
188188

189189
// Update is used to animate the progress bar during transitions. Use
190190
// SetPercent to create the command you'll need to trigger the animation.
191191
//
192192
// If you're rendering with ViewAs you won't need this.
193-
func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
193+
func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
194194
switch msg := msg.(type) {
195195
case FrameMsg:
196196
if msg.id != m.id || msg.tag != m.tag {

0 commit comments

Comments
 (0)