Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Testing the auto-updater
Mikayla461fa8d71eec
diff --git a/crates/auto_update2/src/auto_update.rs b/crates/auto_update2/src/auto_update.rsindex 06b4e450663..aeff68965fd 100644--- a/crates/auto_update2/src/auto_update.rs+++ b/crates/auto_update2/src/auto_update.rs@@ -24,7 +24,13 @@ use workspace::Workspace;const SHOULD_SHOW_UPDATE_NOTIFICATION_KEY: &str = "auto-updater-should-show-updated-notification";const POLL_INTERVAL: Duration = Duration::from_secs(60 * 60);-actions!(Check, DismissErrorMessage, ViewReleaseNotes);+//todo!(remove CheckThatAutoUpdaterWorks)+actions!(+ Check,+ DismissErrorMessage,+ ViewReleaseNotes,+ CheckThatAutoUpdaterWorks+);#[derive(Serialize)]struct UpdateRequestBody {@@ -79,7 +85,15 @@ pub fn init(http_client: Arc<dyn HttpClient>, server_url: String, cx: &mut AppCoAutoUpdateSetting::register(cx);cx.observe_new_views(|wokrspace: &mut Workspace, _cx| {- wokrspace.register_action(|_, action: &Check, cx| check(action, cx));+ wokrspace+ .register_action(|_, action: &Check, cx| check(action, cx))+ .register_action(|_, _action: &CheckThatAutoUpdaterWorks, cx| {+ let prompt = cx.prompt(gpui::PromptLevel::Info, "It does!", &["Ok"]);+ cx.spawn(|_, _cx| async move {+ prompt.await.ok();+ })+ .detach();+ });}).detach();