From 189d0e5fb2fc728c639952dd17fef1abdf251c18 Mon Sep 17 00:00:00 2001 From: adamdottv <2363879+adamdottv@users.noreply.github.com> Date: Fri, 30 May 2025 06:47:44 -0500 Subject: wip: refactoring tui --- internal/tui/components/dialog/session.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/tui/components/dialog/session.go') diff --git a/internal/tui/components/dialog/session.go b/internal/tui/components/dialog/session.go index fd08a7db5..99aa41515 100644 --- a/internal/tui/components/dialog/session.go +++ b/internal/tui/components/dialog/session.go @@ -74,6 +74,9 @@ func (s *sessionDialogCmp) Init() tea.Cmd { func (s *sessionDialogCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { + case tea.WindowSizeMsg: + s.width = msg.Width + s.height = msg.Height case tea.KeyMsg: switch { case key.Matches(msg, sessionKeys.Up) || key.Matches(msg, sessionKeys.K): @@ -98,9 +101,6 @@ func (s *sessionDialogCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case key.Matches(msg, sessionKeys.Escape): return s, util.CmdHandler(CloseSessionDialogMsg{}) } - case tea.WindowSizeMsg: - s.width = msg.Width - s.height = msg.Height } return s, nil } -- cgit v1.2.3