From 2e51ae80640f443d75eb0c71b0bf78550c9ec887 Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Wed, 31 Dec 2025 02:46:14 +0200 Subject: [PATCH] Implement snowballing tab controls --- src/app.rs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/app.rs b/src/app.rs index e88d23c..0a6750d 100644 --- a/src/app.rs +++ b/src/app.rs @@ -262,10 +262,10 @@ impl App { ) -> Result<(), SendError> { match (self.state.current_tab, key) { (_, KeyCode::Esc) => { - self.action_tx.send(GlobalAction::Quit.into())?; + self.action_tx.send(GlobalAction::Quit.into())? } (_, KeyCode::Tab) => { - self.action_tx.send(GlobalAction::NextTab.into())?; + self.action_tx.send(GlobalAction::NextTab.into())? } (Tab::Seeding, KeyCode::Char(c)) => { self.action_tx.send(SeedingAction::EnterChar(c).into())?; @@ -276,6 +276,23 @@ impl App { (Tab::Seeding, KeyCode::Enter) => { self.action_tx.send(GlobalAction::FetchPub.into())?; } + (Tab::Snowballing, KeyCode::Enter) => { + self.action_tx.send(SnowballingAction::Search.into())?; + } + (Tab::Snowballing, KeyCode::Char('h')) => { + self.action_tx + .send(SnowballingAction::SelectLeftPane.into())?; + } + (Tab::Snowballing, KeyCode::Char('l')) => { + self.action_tx + .send(SnowballingAction::SelectRightPane.into())?; + } + (Tab::Snowballing, KeyCode::Char('j')) => { + self.action_tx.send(SnowballingAction::NextItem.into())?; + } + (Tab::Snowballing, KeyCode::Char('k')) => { + self.action_tx.send(SnowballingAction::PrevItem.into())?; + } _ => {} }