on main help sign in
fix(ui): change UI model receiver to pointer back

We need to fix this at some point

commit84bbd5b7587ad538c0b67f27ad9b48934a149cf5 authorAyman Bagabas <ayman.bagabas@gmail.com> dateTue 2 Dec 2025, 13:59 (1 year ago) parentf0942a7
1 file changed+8−7
internal/ui/model/ui.go+8−7
internal/ui/model/ui.go+8−7
@@ -162,15 +162,16 @@ func New(com *common.Common) *UI {
162162}
163163
164164// Init initializes the UI model.
165−func (m UI) Init() tea.Cmd {
165+func (m *UI) Init() tea.Cmd {
166+ var cmds []tea.Cmd
166167 if m.QueryVersion {
167− return tea.RequestTerminalVersion
168+ cmds = append(cmds, tea.RequestTerminalVersion)
168169 }
169− return nil
170+ return tea.Batch(cmds...)
170171}
171172
172173// Update handles updates to the UI model.
173−func (m UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
174+func (m *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
174175 var cmds []tea.Cmd
175176 switch msg := msg.(type) {
176177 case tea.EnvMsg:
@@ -395,7 +396,7 @@ func (m *UI) Cursor() *tea.Cursor {
395396}
396397
397398// View renders the UI model's view.
398−func (m UI) View() tea.View {
399+func (m *UI) View() tea.View {
399400 var v tea.View
400401 v.AltScreen = true
401402 v.BackgroundColor = m.com.Styles.Background
@@ -426,7 +427,7 @@ func (m UI) View() tea.View {
426427}
427428
428429// ShortHelp implements [help.KeyMap].
429−func (m UI) ShortHelp() []key.Binding {
430+func (m *UI) ShortHelp() []key.Binding {
430431 var binds []key.Binding
431432 k := &m.keyMap
432433
@@ -473,7 +474,7 @@ func (m UI) ShortHelp() []key.Binding {
473474}
474475
475476// FullHelp implements [help.KeyMap].
476−func (m UI) FullHelp() [][]key.Binding {
477+func (m *UI) FullHelp() [][]key.Binding {
477478 var binds [][]key.Binding
478479 k := &m.keyMap
479480 help := k.Help