From 703496a49315f7b67442abf0e0df3c41d3605d3b Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Fri, 15 Aug 2025 16:02:40 +0000 Subject: task-012 (#2) Co-authored-by: Joe Carstairs Reviewed-on: https://git.joeac.net/joeac/schist/pulls/2 Co-authored-by: Joe Carstairs Co-committed-by: Joe Carstairs --- schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs | 6 +++++- schist_desktop_gui/src/gui/components/transactions_view.rs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'schist_desktop_gui/src/gui/components') diff --git a/schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs b/schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs index fa2dcac..b31e0e2 100644 --- a/schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs +++ b/schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs @@ -19,6 +19,10 @@ impl BucketNameAndBalance { impl<'a> Into>> for BucketNameAndBalance { fn into(self) -> Element<'a, navigation::Message> { - row![text(self.bucket.name.clone()), text(self.bucket.balance)].into() + row![ + text(self.bucket.name.clone()), + text(self.bucket.balance.unwrap_or(0)) + ] + .into() } } diff --git a/schist_desktop_gui/src/gui/components/transactions_view.rs b/schist_desktop_gui/src/gui/components/transactions_view.rs index 6181a14..3a8333c 100644 --- a/schist_desktop_gui/src/gui/components/transactions_view.rs +++ b/schist_desktop_gui/src/gui/components/transactions_view.rs @@ -43,7 +43,7 @@ impl TransactionsView { } impl<'a> Viewable<'a, Message> for TransactionsView { - fn view(&self) -> Element { + fn view(&'a self) -> Element<'a, Message> { let navigation = self.navigation.view().map(Message::NavigationMessage); let main_content = column![iced::widget::text(self.greeting.clone())]; row![ -- cgit v1.2.3