diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 242d3eb5943a5032dffc3b021250ab1da3773cff..f214e930c6016058b4b2da2e4517978841f74006 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -412,9 +412,6 @@ pub fn initialize_workspace( } } - #[cfg(target_os = "windows")] - unstable_version_notification(cx); - let edit_prediction_menu_handle = PopoverMenuHandle::default(); let edit_prediction_ui = cx.new(|cx| { edit_prediction_ui::EditPredictionButton::new( @@ -496,53 +493,6 @@ pub fn initialize_workspace( .detach(); } -#[cfg(target_os = "windows")] -fn unstable_version_notification(cx: &mut App) { - if !matches!( - ReleaseChannel::try_global(cx), - Some(ReleaseChannel::Nightly) - ) { - return; - } - let db_key = "zed_windows_nightly_notif_shown_at".to_owned(); - let time = chrono::Utc::now(); - if let Some(last_shown) = db::kvp::KEY_VALUE_STORE - .read_kvp(&db_key) - .log_err() - .flatten() - .and_then(|timestamp| chrono::DateTime::parse_from_rfc3339(×tamp).ok()) - { - if time.fixed_offset() - last_shown < chrono::Duration::days(7) { - return; - } - } - cx.spawn(async move |_| { - db::kvp::KEY_VALUE_STORE - .write_kvp(db_key, time.to_rfc3339()) - .await - }) - .detach_and_log_err(cx); - struct WindowsNightly; - show_app_notification(NotificationId::unique::(), cx, |cx| { - cx.new(|cx| { - MessageNotification::new("You're using an unstable version of Zed (Nightly)", cx) - .primary_message("Download Stable") - .primary_icon_color(Color::Accent) - .primary_icon(IconName::Download) - .primary_on_click(|window, cx| { - window.dispatch_action( - zed_actions::OpenBrowser { - url: "https://zed.dev/download".to_string(), - } - .boxed_clone(), - cx, - ); - cx.emit(DismissEvent); - }) - }) - }); -} - #[cfg(any(target_os = "linux", target_os = "freebsd"))] #[allow(unused)] fn initialize_file_watcher(window: &mut Window, cx: &mut Context) {