don't clean or restore nothing

This commit is contained in:
Lilian Jónsdóttir 2024-07-16 11:11:42 -07:00
parent 2515756d1d
commit b0c5c9ed69

View file

@ -199,12 +199,12 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case key.Matches(msg, m.keys.invr):
m.invertSelection()
case key.Matches(msg, m.keys.clen):
if m.mode == modes.Interactive {
if m.mode == modes.Interactive && len(m.selected) > 0 {
m.mode = modes.Cleaning
return m.quit(false)
}
case key.Matches(msg, m.keys.rstr):
if m.mode == modes.Interactive {
if m.mode == modes.Interactive && len(m.selected) > 0 {
m.mode = modes.Restoring
return m.quit(false)
}