mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-10-10 14:16:41 +03:00
Update subs for Tea v0.2.1. That is to say, remove the their arguments.
This commit is contained in:
@@ -154,14 +154,24 @@ func updateInputs(msg tea.Msg, m Model) Model {
|
||||
}
|
||||
|
||||
func subscriptions(model tea.Model) tea.Subs {
|
||||
m, ok := model.(Model)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
// It's a little hacky, but we're using the subscription from one
|
||||
// input element to handle the blinking for all elements. It doesn't
|
||||
// have to be this way, we're just feeling a bit lazy at the moment.
|
||||
inputSub, err := input.MakeSub(m.nameInput)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return tea.Subs{
|
||||
// It's a little hacky, but we're using the subscription from one
|
||||
// input element to handle the blinking for all elements. It doesn't
|
||||
// have to be this way, we're just feeling a bit lazy at the moment.
|
||||
"blink": func(model tea.Model) tea.Msg {
|
||||
m, _ := model.(Model)
|
||||
return input.Blink(m.nameInput)
|
||||
},
|
||||
"blink": inputSub,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user