Refactor initial 'Scanning Disks' popup
Starting that in app.rs makes more sense
This commit is contained in:
parent
51610fdc23
commit
1373d33f42
2 changed files with 5 additions and 4 deletions
|
|
@ -43,10 +43,7 @@ pub struct Popup {
|
||||||
|
|
||||||
impl Popup {
|
impl Popup {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self::default()
|
||||||
popup_text: String::from("Scanning Disks..."),
|
|
||||||
..Default::default()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -269,6 +269,10 @@ impl App {
|
||||||
}
|
}
|
||||||
|
|
||||||
let action_tx = self.action_tx.clone();
|
let action_tx = self.action_tx.clone();
|
||||||
|
action_tx.send(Action::DisplayPopup(
|
||||||
|
popup::Type::Info,
|
||||||
|
String::from("Scanning Disks..."),
|
||||||
|
))?;
|
||||||
loop {
|
loop {
|
||||||
self.handle_events(&mut tui).await?;
|
self.handle_events(&mut tui).await?;
|
||||||
self.handle_actions(&mut tui)?;
|
self.handle_actions(&mut tui)?;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue