feat(handlers): Support for root folder actions

This commit is contained in:
2024-12-03 16:18:39 -07:00
parent 4eb974567f
commit bda6f253e0
6 changed files with 1036 additions and 1 deletions
+6
View File
@@ -2,6 +2,7 @@ use blocklist::BlocklistHandler;
use downloads::DownloadsHandler;
use history::HistoryHandler;
use library::LibraryHandler;
use root_folders::RootFoldersHandler;
use crate::{
app::{key_binding::DEFAULT_KEYBINDINGS, App},
@@ -15,6 +16,7 @@ mod blocklist;
mod downloads;
mod history;
mod library;
mod root_folders;
#[cfg(test)]
#[path = "sonarr_handler_tests.rs"]
@@ -46,6 +48,10 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SonarrHandler<'a, 'b
_ if HistoryHandler::accepts(self.active_sonarr_block) => {
HistoryHandler::with(self.key, self.app, self.active_sonarr_block, self.context).handle()
}
_ if RootFoldersHandler::accepts(self.active_sonarr_block) => {
RootFoldersHandler::with(self.key, self.app, self.active_sonarr_block, self.context)
.handle()
}
_ => self.handle_key_event(),
}
}