diff options
| author | Joe Carstairs <me@joeac.net> | 2026-02-01 19:17:34 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-02-01 19:17:34 +0000 |
| commit | 650cc444930bb82341ac6dedf94000ce1bce6503 (patch) | |
| tree | 503a7ba9b3f27fba0abe10f9564d28e520d43330 /schist_desktop_gui/src | |
| parent | 498f8fd62dc6ea017b9ff961b719ae86bcedbbd3 (diff) | |
BucketsView::active_group()
Diffstat (limited to 'schist_desktop_gui/src')
| -rw-r--r-- | schist_desktop_gui/src/gui/components/buckets_view.rs | 7 | ||||
| -rw-r--r-- | schist_desktop_gui/src/gui/components/navigation.rs | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/schist_desktop_gui/src/gui/components/buckets_view.rs b/schist_desktop_gui/src/gui/components/buckets_view.rs index 01c91db..90189e6 100644 --- a/schist_desktop_gui/src/gui/components/buckets_view.rs +++ b/schist_desktop_gui/src/gui/components/buckets_view.rs @@ -43,6 +43,13 @@ impl BucketsView { } } + pub fn active_group(&self) -> Option<String> { + self.navigation + .active_option + .as_ref() + .map(|active_option| active_option.group()) + } + fn update_greeting(&mut self, active_entry: &str) { self.greeting = format!("Hello, {}!", active_entry); } diff --git a/schist_desktop_gui/src/gui/components/navigation.rs b/schist_desktop_gui/src/gui/components/navigation.rs index d15e553..a89a761 100644 --- a/schist_desktop_gui/src/gui/components/navigation.rs +++ b/schist_desktop_gui/src/gui/components/navigation.rs @@ -14,7 +14,7 @@ use std::fmt::Debug; #[derive(Clone, Debug)] pub struct Navigation<TOption> { options_before_active: Vec<TOption>, - active_option: Option<TOption>, + pub active_option: Option<TOption>, options_after_active: Vec<TOption>, } |
