add update switch

This commit is contained in:
2023-02-24 23:21:05 -08:00
parent acf799bfeb
commit 91ae77071e

View File

@@ -35,6 +35,16 @@ var settingsKey = key.NewBinding(
)
func (m Settings) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch m.cursor {
case authors:
var cmd tea.Cmd
m.AuthorList, cmd = m.AuthorList.Update(msg)
return m, cmd
case repos:
var cmd tea.Cmd
m.RepoList, cmd = m.RepoList.Update(msg)
return m, cmd
}
return m, nil
}