Show float notification on refresh cmd

async
Manos Pitsidianakis 2020-02-28 09:16:19 +02:00
parent 670485e8c7
commit a94bb1e27a
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
2 changed files with 11 additions and 0 deletions

View File

@ -631,6 +631,11 @@ impl Account {
.stdout(std::process::Stdio::null())
.stderr(std::process::Stdio::piped())
.spawn()?;
self.sender
.send(ThreadEvent::UIEvent(UIEvent::StatusEvent(
StatusEvent::DisplayMessage(format!("Running command {}", refresh_command)),
)))
.unwrap();
return Ok(());
}
@ -1045,6 +1050,10 @@ impl Account {
self.init();
}
self.is_online = ret.is_ok();
if !self.is_online {
self.backend.write().unwrap().connect();
}
ret
}

View File

@ -960,7 +960,9 @@ impl State {
msg: msg.clone(),
});
self.display_messages_active = true;
self.display_messages_expiration_start = None;
self.display_messages_pos = self.display_messages.len() - 1;
self.redraw();
}
UIEvent::FinishedUIDialog(ref id, ref mut results)
if self.overlay.iter().any(|c| c.id() == *id) =>