Skip to content

Commit

Permalink
update: On delete a saved filter user have to confirm their action
Browse files Browse the repository at this point in the history
  • Loading branch information
Koustavd18 committed Aug 13, 2024
1 parent 9c805ea commit 82102cd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/model/savedFilters.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,20 @@ func (m modelFilter) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if msg.String() == "ctrl+c" {
return m, tea.Quit
}
if msg.String() == "q" {
return m, tea.Quit
}
if msg.String() == "a" || msg.Type == tea.KeyEnter {
selectedFilterApply = m.list.SelectedItem().(Item)
return m, tea.Quit
}
if msg.String() == "d" {
// selectedFilterDelete = m.list.SelectedItem().(Item)
deleteFilterState = true
return m, nil

}
if msg.String() != "d"{
deleteFilterState = false
return m,nil
}
if msg.String() == "y" {
selectedFilterDelete = m.list.SelectedItem().(Item)
Expand Down

0 comments on commit 82102cd

Please sign in to comment.