Skip to content

Commit

Permalink
Optimised Build
Browse files Browse the repository at this point in the history
  • Loading branch information
Koustavd18 committed Aug 12, 2024
1 parent 8b1945c commit 6cf93e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/model/savedFilters.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const (

var (
docStyle = lipgloss.NewStyle().Margin(1, 2)
delete bool
deleteFilterState bool
)

// FilterDetails represents the structure of filter data
Expand Down Expand Up @@ -96,7 +96,7 @@ func (d itemDelegate) Render(w io.Writer, m list.Model, index int, listItem list
}

func (d itemDelegate) ShortHelp() []key.Binding {
if delete {
if deleteFilterState {
return []key.Binding{
key.NewBinding(
key.WithKeys(confirmDelete),
Expand Down Expand Up @@ -176,7 +176,7 @@ func (m modelFilter) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
if msg.String() == "d" {
// selectedFilterDelete = m.list.SelectedItem().(Item)
delete = true
deleteFilterState = true
return m, nil

}
Expand All @@ -185,7 +185,7 @@ func (m modelFilter) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, tea.Quit
}
if msg.String() == "n" {
delete = false
deleteFilterState = false
return m, nil
}
case tea.WindowSizeMsg:
Expand Down

0 comments on commit 6cf93e8

Please sign in to comment.