fix(handler): Fixed a bug in the history handler that wouldn't reset the filter or search if a user hit 'esc' on the History tab

This commit is contained in:
2024-12-05 19:08:11 -07:00
parent bd1a4f0939
commit b27c13cf74
3 changed files with 20 additions and 1 deletions
+7 -1
View File
@@ -1,3 +1,5 @@
use log::debug;
use crate::app::key_binding::DEFAULT_KEYBINDINGS;
use crate::app::App;
use crate::event::Key;
@@ -250,7 +252,11 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for HistoryHandler<'a, '
ActiveSonarrBlock::HistoryItemDetails | ActiveSonarrBlock::HistorySortPrompt => {
self.app.pop_navigation_stack();
}
_ => handle_clear_errors(self.app),
_ => {
self.app.data.sonarr_data.history.reset_search();
self.app.data.sonarr_data.history.reset_filter();
handle_clear_errors(self.app);
}
}
}