From cfc1b9ba870b451ceaed3fe7bec98d028b042d58 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Tue, 10 Jun 2025 10:30:42 -0400 Subject: [PATCH] fix(ui): model init signature --- ui/ui.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/ui.go b/ui/ui.go index cc561cb..41ddde3 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -148,10 +148,10 @@ func newModel(cfg Config) tea.Model { } } -func (m model) Init() (tea.Model, tea.Cmd) { +func (m model) Init() tea.Cmd { cmds := []tea.Cmd{m.stash.spinner.Tick} cmds = append(cmds, findLocalFiles(*m.common)) - return m, tea.Batch(cmds...) + return tea.Batch(cmds...) } func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { @@ -175,7 +175,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case "r": if m.state == stateShowStash { m.stash.markdowns = nil - return m.Init() + return m, m.Init() } case "q":