From 1373d33f4230101f9f0576598de02f94b60dd700 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Jan 2025 19:29:34 -0800 Subject: [PATCH] Refactor initial 'Scanning Disks' popup Starting that in app.rs makes more sense --- core/src/components/popup.rs | 5 +---- deja_vu/src/app.rs | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/components/popup.rs b/core/src/components/popup.rs index ea1f831..6a1c695 100644 --- a/core/src/components/popup.rs +++ b/core/src/components/popup.rs @@ -43,10 +43,7 @@ pub struct Popup { impl Popup { pub fn new() -> Self { - Self { - popup_text: String::from("Scanning Disks..."), - ..Default::default() - } + Self::default() } } diff --git a/deja_vu/src/app.rs b/deja_vu/src/app.rs index 4acea6e..c235f3a 100644 --- a/deja_vu/src/app.rs +++ b/deja_vu/src/app.rs @@ -269,6 +269,10 @@ impl App { } let action_tx = self.action_tx.clone(); + action_tx.send(Action::DisplayPopup( + popup::Type::Info, + String::from("Scanning Disks..."), + ))?; loop { self.handle_events(&mut tui).await?; self.handle_actions(&mut tui)?;