Browse Source

types.rs: add JobCanceled event

tags/alpha-0.6.0
Manos Pitsidianakis 7 months ago
parent
commit
ed3b2fa6c8
Signed by: epilys GPG Key ID: 73627C2F690DF710
2 changed files with 3 additions and 1 deletions
  1. +2
    -1
      src/components/utilities.rs
  2. +1
    -0
      src/types.rs

+ 2
- 1
src/components/utilities.rs View File

@ -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
- 0
src/types.rs View File

@ -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