Refactored filtering and searching logic to be more clean and added home/end support in tables.

This commit is contained in:
2023-08-08 10:50:04 -06:00
parent 864dd4e331
commit 24a36443e9
7 changed files with 223 additions and 96 deletions
@@ -39,6 +39,23 @@ impl<'a> KeyEventHandler<'a, ActiveRadarrBlock> for CollectionDetailsHandler<'a>
}
}
fn handle_home(&mut self) {
if ActiveRadarrBlock::CollectionDetails == *self.active_radarr_block {
self.app.data.radarr_data.collection_movies.scroll_to_top();
}
}
fn handle_end(&mut self) {
if ActiveRadarrBlock::CollectionDetails == *self.active_radarr_block {
self
.app
.data
.radarr_data
.collection_movies
.scroll_to_bottom();
}
}
fn handle_tab_action(&mut self) {}
fn handle_submit(&mut self) {