diff options
| author | Joe Carstairs <me@joeac.net> | 2025-08-15 16:02:40 +0000 |
|---|---|---|
| committer | joeac <me@joeac.net> | 2025-08-15 16:02:40 +0000 |
| commit | 703496a49315f7b67442abf0e0df3c41d3605d3b (patch) | |
| tree | 8e92f3842710162f3b26e910eb931950c1049f07 /schist_desktop_gui/src/gui | |
| parent | 8d714f760bd0349560d464583a151a04a19de1c9 (diff) | |
task-012 (#2)
Co-authored-by: Joe Carstairs <jcarstairs@scottlogic.com>
Reviewed-on: https://git.joeac.net/joeac/schist/pulls/2
Co-authored-by: Joe Carstairs <me@joeac.net>
Co-committed-by: Joe Carstairs <me@joeac.net>
Diffstat (limited to 'schist_desktop_gui/src/gui')
| -rw-r--r-- | schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs | 6 | ||||
| -rw-r--r-- | schist_desktop_gui/src/gui/components/transactions_view.rs | 2 |
2 files changed, 6 insertions, 2 deletions
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<Element<'a, navigation::Message<BucketNameAndBalance>>> for BucketNameAndBalance { fn into(self) -> Element<'a, navigation::Message<BucketNameAndBalance>> { - 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<Message> { + 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