summaryrefslogtreecommitdiff
path: root/schist_desktop_gui/src/gui/screens/main_screen
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2025-08-25 16:35:45 +0000
committerjoeac <me@joeac.net>2025-08-25 16:35:45 +0000
commitfe85652e4d3e8906824baddaafd05d19105579b8 (patch)
tree31b56e31cbf289a34ec1d6707becf3c60933b56f /schist_desktop_gui/src/gui/screens/main_screen
parentd082a30de6a0cbd1fbe2ab5a4316db0891004129 (diff)
task-072
Co-authored-by: Joe Carstairs <jcarstairs@scottlogic.com> Reviewed-on: https://git.joeac.net/joeac/schist/pulls/3 Co-authored-by: Joe Carstairs <me@joeac.net> Co-committed-by: Joe Carstairs <me@joeac.net>
Diffstat (limited to 'schist_desktop_gui/src/gui/screens/main_screen')
-rw-r--r--schist_desktop_gui/src/gui/screens/main_screen/main_screen.rs10
-rw-r--r--schist_desktop_gui/src/gui/screens/main_screen/view.rs4
2 files changed, 7 insertions, 7 deletions
diff --git a/schist_desktop_gui/src/gui/screens/main_screen/main_screen.rs b/schist_desktop_gui/src/gui/screens/main_screen/main_screen.rs
index 0af3c28..00f4ec3 100644
--- a/schist_desktop_gui/src/gui/screens/main_screen/main_screen.rs
+++ b/schist_desktop_gui/src/gui/screens/main_screen/main_screen.rs
@@ -147,12 +147,12 @@ impl<'a> Component<'a, Message, Action> for MainScreen {
}
impl MainScreen {
- pub fn new(buckets: Vec<Bucket>, accounts: Vec<Account>) -> Self {
+ pub fn new() -> Self {
Self {
- balances_view: BalancesView::new(buckets.clone()),
- buckets: buckets.clone(),
- buckets_view: BucketsView::new(buckets, "Hello, buckets!"),
- transactions_view: TransactionsView::new(accounts, "Hello, transactions!"),
+ balances_view: BalancesView::new(Vec::new()),
+ buckets: Vec::new(),
+ buckets_view: BucketsView::new(Vec::new(), "Hello, buckets!"),
+ transactions_view: TransactionsView::new(Vec::new(), "Hello, transactions!"),
active_view: View::Balances,
view_navigation: Navigation::new(Some(View::Balances), View::views()),
}
diff --git a/schist_desktop_gui/src/gui/screens/main_screen/view.rs b/schist_desktop_gui/src/gui/screens/main_screen/view.rs
index eb9c88e..2be427b 100644
--- a/schist_desktop_gui/src/gui/screens/main_screen/view.rs
+++ b/schist_desktop_gui/src/gui/screens/main_screen/view.rs
@@ -1,4 +1,4 @@
-use iced::Element;
+use iced::{widget::Text, Element};
use crate::gui::components::navigation;
@@ -43,6 +43,6 @@ impl View {
impl<'a> Into<Element<'a, navigation::Message<View>>> for View {
fn into(self) -> Element<'a, navigation::Message<View>> {
- iced::widget::text(self.name()).into()
+ Text::new(self.name()).into()
}
}