Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Rename `workspace::Restart` action into `workspace::Reload` (#12672)
Kirill Bulatov953393f6ce3d
diff --git a/crates/activity_indicator/src/activity_indicator.rs b/crates/activity_indicator/src/activity_indicator.rsindex b0ff7632786..47f9d1c2e20 100644--- a/crates/activity_indicator/src/activity_indicator.rs+++ b/crates/activity_indicator/src/activity_indicator.rs@@ -285,10 +285,10 @@ impl ActivityIndicator {icon: None,message: "Click to restart and update Zed".to_string(),on_click: Some(Arc::new({- let restart = workspace::Restart {+ let reload = workspace::Reload {binary_path: Some(binary_path.clone()),};- move |_, cx| workspace::restart(&restart, cx)+ move |_, cx| workspace::reload(&reload, cx)})),},AutoUpdateStatus::Errored => Content {diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rsindex 4f72c4abe25..8747a54d077 100644--- a/crates/collab_ui/src/collab_titlebar_item.rs+++ b/crates/collab_ui/src/collab_titlebar_item.rs@@ -686,7 +686,7 @@ impl CollabTitlebarItem {.on_click(|_, cx| {if let Some(auto_updater) = auto_update::AutoUpdater::get(cx) {if auto_updater.read(cx).status().is_updated() {- workspace::restart(&Default::default(), cx);+ workspace::reload(&Default::default(), cx);return;}}diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex feafc074068..8fbeeebb10c 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -185,7 +185,7 @@ pub struct CloseInactiveTabsAndPanes {pub struct SendKeystrokes(pub String);#[derive(Clone, Deserialize, PartialEq, Default)]-pub struct Restart {+pub struct Reload {pub binary_path: Option<PathBuf>,}@@ -198,7 +198,7 @@ impl_actions!(CloseInactiveTabsAndPanes,NewFileInDirection,OpenTerminal,- Restart,+ Reload,Save,SaveAll,SwapPaneInDirection,@@ -282,7 +282,7 @@ pub fn init(app_state: Arc<AppState>, cx: &mut AppContext) {notifications::init(cx);cx.on_action(Workspace::close_global);- cx.on_action(restart);+ cx.on_action(reload);cx.on_action({let app_state = Arc::downgrade(&app_state);@@ -5085,7 +5085,7 @@ pub fn join_in_room_project(})}-pub fn restart(restart: &Restart, cx: &mut AppContext) {+pub fn reload(reload: &Reload, cx: &mut AppContext) {let should_confirm = WorkspaceSettings::get_global(cx).confirm_quit;let mut workspace_windows = cx.windows()@@ -5111,7 +5111,7 @@ pub fn restart(restart: &Restart, cx: &mut AppContext) {.ok();}- let binary_path = restart.binary_path.clone();+ let binary_path = reload.binary_path.clone();cx.spawn(|mut cx| async move {if let Some(prompt) = prompt {let answer = prompt.await?;