Merge pull request #1866 from zed-industries/tweak-restart-zed-message

Remove restart to update zed icon
This commit is contained in:
Kay Simmons 2022-11-08 14:38:10 -08:00 committed by GitHub
commit 5707bae9b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,6 @@ actions!(lsp_status, [ShowErrorMessage]);
const DOWNLOAD_ICON: &str = "icons/download_12.svg"; const DOWNLOAD_ICON: &str = "icons/download_12.svg";
const WARNING_ICON: &str = "icons/triangle_exclamation_12.svg"; const WARNING_ICON: &str = "icons/triangle_exclamation_12.svg";
const DONE_ICON: &str = "icons/circle_check_12.svg";
pub enum Event { pub enum Event {
ShowError { lsp_name: Arc<str>, error: String }, ShowError { lsp_name: Arc<str>, error: String },
@ -237,7 +236,6 @@ impl ActivityIndicator {
// Show any application auto-update info. // Show any application auto-update info.
if let Some(updater) = &self.auto_updater { if let Some(updater) = &self.auto_updater {
// let theme = &cx.global::<Settings>().theme.workspace.status_bar;
match &updater.read(cx).status() { match &updater.read(cx).status() {
AutoUpdateStatus::Checking => ( AutoUpdateStatus::Checking => (
Some(DOWNLOAD_ICON), Some(DOWNLOAD_ICON),
@ -254,9 +252,7 @@ impl ActivityIndicator {
"Installing Zed update…".to_string(), "Installing Zed update…".to_string(),
None, None,
), ),
AutoUpdateStatus::Updated => { AutoUpdateStatus::Updated => (None, "Restart to update Zed".to_string(), None),
(Some(DONE_ICON), "Restart to update Zed".to_string(), None)
}
AutoUpdateStatus::Errored => ( AutoUpdateStatus::Errored => (
Some(WARNING_ICON), Some(WARNING_ICON),
"Auto update failed".to_string(), "Auto update failed".to_string(),