Refactor initial 'Scanning Disks' popup

Starting that in app.rs makes more sense
This commit is contained in:
2Shirt 2025-01-19 19:29:34 -08:00
parent 51610fdc23
commit 1373d33f42
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 5 additions and 4 deletions

View file

@ -43,10 +43,7 @@ pub struct Popup {
impl Popup {
pub fn new() -> Self {
Self {
popup_text: String::from("Scanning Disks..."),
..Default::default()
}
Self::default()
}
}

View file

@ -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)?;