|
|
@@ -82,11 +82,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|
|
return m, tea.Quit
|
|
|
}
|
|
|
}
|
|
|
- default:
|
|
|
+ case IssueCollection:
|
|
|
if msg, ok := msg.(tea.KeyMsg); ok {
|
|
|
switch msg.String() {
|
|
|
- case "q":
|
|
|
- return m, tea.Quit
|
|
|
case "j":
|
|
|
if collection, ok := m.widget.(IssueCollection); ok {
|
|
|
if collection.selection+1 < len(collection.Collection) {
|
|
|
@@ -116,12 +114,21 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|
|
return m, m.load
|
|
|
}
|
|
|
return m, nil
|
|
|
+ case "q":
|
|
|
+ return m, tea.Quit
|
|
|
+ }
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ if msg, ok := msg.(tea.KeyMsg); ok {
|
|
|
+ switch msg.String() {
|
|
|
+ case "q":
|
|
|
+ return m, tea.Quit
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
switch msg := msg.(type) {
|
|
|
- case tea.KeyMsg:
|
|
|
+ case tea.KeyMsg: // keymsg capture that is always present
|
|
|
switch msg.String() {
|
|
|
case "ctrl+c":
|
|
|
return m, tea.Quit
|