Skip to content

Commit

Permalink
Update switch case for viewrow state handling
Browse files Browse the repository at this point in the history
Co-authored-by: Maksym Kryvchun <[email protected]>
  • Loading branch information
Vedu1996 and hedhyw authored Jan 14, 2024
1 parent 201b998 commit 3c5cb7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/app/stateviewrow.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 3c5cb7e

Please sign in to comment.