diff options
| -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>, } |
