From 30dfa8acb2a1270cbd3fc16a474f14daea11664c Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Wed, 17 Jan 2024 16:51:30 +0100 Subject: [PATCH] patch-select: Unify select and list operation --- bin/commands/issue/suite/page.rs | 4 +- bin/commands/patch.rs | 78 ++++++++----- bin/commands/patch/list.rs | 181 ----------------------------- bin/commands/patch/list/event.rs | 131 --------------------- bin/commands/patch/list/page.rs | 170 --------------------------- bin/commands/patch/list/ui.rs | 27 ----- bin/commands/patch/select.rs | 75 +++++++++--- bin/commands/patch/select/event.rs | 93 ++++++++++++++- bin/commands/patch/select/page.rs | 50 ++++---- bin/commands/patch/select/ui.rs | 132 ++++++++++++++++++++- bin/commands/patch/suite/page.rs | 4 +- src/lib.rs | 4 +- 12 files changed, 357 insertions(+), 592 deletions(-) delete mode 100644 bin/commands/patch/list.rs delete mode 100644 bin/commands/patch/list/event.rs delete mode 100644 bin/commands/patch/list/page.rs delete mode 100644 bin/commands/patch/list/ui.rs diff --git a/bin/commands/issue/suite/page.rs b/bin/commands/issue/suite/page.rs index 26e33f2f..7e28b889 100644 --- a/bin/commands/issue/suite/page.rs +++ b/bin/commands/issue/suite/page.rs @@ -110,7 +110,7 @@ impl ListPage { impl ViewPage for ListPage { fn mount( - &self, + &mut self, app: &mut Application, context: &Context, theme: &Theme, @@ -338,7 +338,7 @@ impl IssuePage { impl ViewPage for IssuePage { fn mount( - &self, + &mut self, app: &mut Application, context: &Context, theme: &Theme, diff --git a/bin/commands/patch.rs b/bin/commands/patch.rs index 7cfe5c06..a77a039b 100644 --- a/bin/commands/patch.rs +++ b/bin/commands/patch.rs @@ -1,7 +1,5 @@ #[path = "patch/common.rs"] mod common; -#[path = "patch/list.rs"] -mod list; #[path = "patch/select.rs"] mod select; #[path = "patch/suite.rs"] @@ -24,12 +22,19 @@ pub const HELP: Help = Help { usage: r#" Usage - rad-tui patch select - rad-tui patch list + rad-tui patch [