summaryrefslogtreecommitdiff
path: root/schist_desktop_gui/src/gui/components
diff options
context:
space:
mode:
Diffstat (limited to 'schist_desktop_gui/src/gui/components')
-rw-r--r--schist_desktop_gui/src/gui/components/buckets_view.rs35
1 files changed, 17 insertions, 18 deletions
diff --git a/schist_desktop_gui/src/gui/components/buckets_view.rs b/schist_desktop_gui/src/gui/components/buckets_view.rs
index 90189e6..7419b7d 100644
--- a/schist_desktop_gui/src/gui/components/buckets_view.rs
+++ b/schist_desktop_gui/src/gui/components/buckets_view.rs
@@ -20,8 +20,8 @@ pub struct BucketsView {
#[derive(Clone, Debug)]
pub enum Message {
NavigationMessage(navigation::Message<BucketNavigationEntry>),
- SelectNextBucket,
- SelectPrevBucket,
+ SelectNext,
+ SelectPrev,
SetBuckets(Vec<Bucket>),
}
@@ -85,6 +85,7 @@ impl<'a> Component<'a, Message, Action> for BucketsView {
));
Action::None
}
+
Message::NavigationMessage(message) => match self.navigation.update(message) {
navigation::Action::SelectOption(bucket_navigation_entry) => {
self.update_greeting(&bucket_navigation_entry.to_string());
@@ -92,24 +93,22 @@ impl<'a> Component<'a, Message, Action> for BucketsView {
}
navigation::Action::None => Action::None,
},
- Message::SelectNextBucket => {
- match self.navigation.update(navigation::Message::SelectNext) {
- navigation::Action::SelectOption(bucket_navigation_entry) => {
- self.update_greeting(&bucket_navigation_entry.to_string());
- Action::None
- }
- navigation::Action::None => Action::None,
+
+ Message::SelectNext => match self.navigation.update(navigation::Message::SelectNext) {
+ navigation::Action::SelectOption(bucket_navigation_entry) => {
+ self.update_greeting(&bucket_navigation_entry.to_string());
+ Action::None
}
- }
- Message::SelectPrevBucket => {
- match self.navigation.update(navigation::Message::SelectPrev) {
- navigation::Action::SelectOption(bucket_navigation_entry) => {
- self.update_greeting(&bucket_navigation_entry.to_string());
- Action::None
- }
- navigation::Action::None => Action::None,
+ navigation::Action::None => Action::None,
+ },
+
+ Message::SelectPrev => match self.navigation.update(navigation::Message::SelectPrev) {
+ navigation::Action::SelectOption(bucket_navigation_entry) => {
+ self.update_greeting(&bucket_navigation_entry.to_string());
+ Action::None
}
- }
+ navigation::Action::None => Action::None,
+ },
}
}
}