From 3c5cb7e06d8ef53452af4ecf486fcffbaa2ea2b0 Mon Sep 17 00:00:00 2001 From: Vedu1996 <28388096+Vedu1996@users.noreply.github.com> Date: Sun, 14 Jan 2024 13:24:19 +0530 Subject: [PATCH] Update switch case for viewrow state handling Co-authored-by: Maksym Kryvchun --- internal/app/stateviewrow.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/app/stateviewrow.go b/internal/app/stateviewrow.go index 271b04f..16ae580 100644 --- a/internal/app/stateviewrow.go +++ b/internal/app/stateviewrow.go @@ -62,10 +62,10 @@ func (s StateViewRow) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case events.ErrorOccuredMsg: return s.handleErrorOccuredMsg(msg) case tea.KeyMsg: - switch { - case key.Matches(msg, s.keys.Back), key.Matches(msg, s.keys.ToggleView): + if key.Matches(msg, s.keys.Back) || key.Matches(msg, s.keys.ToggleView) { return s.previousState.withApplication(s.Application) } + if cmd = s.handleKeyMsg(msg); cmd != nil { return s, cmd }