Browse Source

types.rs: add JobCanceled event

master
Manos Pitsidianakis 2 years ago
parent
commit
ed3b2fa6c8
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 3
      src/components/utilities.rs
  2. 1
      src/types.rs

3
src/components/utilities.rs

@ -1163,7 +1163,8 @@ impl Component for StatusBar {
self.status = format!("{} | {}", self.mode, std::mem::replace(s, String::new()));
self.dirty = true;
}
UIEvent::StatusEvent(StatusEvent::JobFinished(ref job_id)) => {
UIEvent::StatusEvent(StatusEvent::JobCanceled(ref job_id))
| UIEvent::StatusEvent(StatusEvent::JobFinished(ref job_id)) => {
self.in_progress_jobs.remove(job_id);
if self.in_progress_jobs.is_empty() {
self.progress_spinner.stop();

1
src/types.rs

@ -55,6 +55,7 @@ pub enum StatusEvent {
UpdateStatus(String),
NewJob(JobId),
JobFinished(JobId),
JobCanceled(JobId),
}
/// `ThreadEvent` encapsulates all of the possible values we need to transfer between our threads

Loading…
Cancel
Save