diff --git a/crates/auto_update/src/auto_update.rs b/crates/auto_update/src/auto_update.rs index a129caf51f980c25423b5a85f543f861836940dd..a39f8027e6cd4d9a50a38ea5657be0ea82da787c 100644 --- a/crates/auto_update/src/auto_update.rs +++ b/crates/auto_update/src/auto_update.rs @@ -30,6 +30,7 @@ pub enum AutoUpdateStatus { Idle, Checking, Downloading, + Installing, Updated, Errored, } @@ -175,6 +176,11 @@ impl AutoUpdater { smol::io::copy(response.bytes(), &mut dmg_file).await?; log::info!("downloaded update. path:{:?}", dmg_path); + this.update(&mut cx, |this, cx| { + this.status = AutoUpdateStatus::Installing; + cx.notify(); + }); + let output = Command::new("hdiutil") .args(&["attach", "-nobrowse"]) .arg(&dmg_path) @@ -215,7 +221,7 @@ impl AutoUpdater { } this.update(&mut cx, |this, cx| { - this.status = AutoUpdateStatus::Idle; + this.status = AutoUpdateStatus::Updated; cx.notify(); }); Ok(()) @@ -245,6 +251,11 @@ impl View for AutoUpdateIndicator { theme.auto_update_progress_message.clone(), ) .boxed(), + AutoUpdateStatus::Installing => Text::new( + "Installing update…".to_string(), + theme.auto_update_done_message.clone(), + ) + .boxed(), AutoUpdateStatus::Updated => Text::new( "Restart to update Zed".to_string(), theme.auto_update_done_message.clone(),