ctrlret: replaced return types of controllers from tea.Cmd to tea.Msg

This dramatically cuts downs the number of closures.
This commit is contained in:
Leon Mika 2022-08-18 21:39:13 +10:00
parent 931b11cd0d
commit 5b6bf1f0ae
17 changed files with 472 additions and 562 deletions

View file

@ -62,7 +62,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg.String() {
// TEMP
case ":":
return m, m.cmdController.Prompt()
return m, func() tea.Msg { return m.cmdController.Prompt() }
case "w":
return m, m.controller.ViewLogLineFullScreen(m.logLines.SelectedLogLine())
// END TEMP