Rename {project_panel,contacts_panel}::Toggle to ToggleFocus
This commit is contained in:
@@ -242,11 +242,11 @@ pub fn menus() -> Vec<Menu<'static>> {
|
||||
MenuItem::Separator,
|
||||
MenuItem::Action {
|
||||
name: "Project Panel",
|
||||
action: Box::new(project_panel::Toggle),
|
||||
action: Box::new(project_panel::ToggleFocus),
|
||||
},
|
||||
MenuItem::Action {
|
||||
name: "Contacts Panel",
|
||||
action: Box::new(contacts_panel::Toggle),
|
||||
action: Box::new(contacts_panel::ToggleFocus),
|
||||
},
|
||||
MenuItem::Action {
|
||||
name: "Command Palette",
|
||||
|
||||
@@ -201,12 +201,16 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::MutableAppContext) {
|
||||
},
|
||||
);
|
||||
cx.add_action(
|
||||
|workspace: &mut Workspace, _: &project_panel::Toggle, cx: &mut ViewContext<Workspace>| {
|
||||
|workspace: &mut Workspace,
|
||||
_: &project_panel::ToggleFocus,
|
||||
cx: &mut ViewContext<Workspace>| {
|
||||
workspace.toggle_sidebar_item_focus(Side::Left, 0, cx);
|
||||
},
|
||||
);
|
||||
cx.add_action(
|
||||
|workspace: &mut Workspace, _: &contacts_panel::Toggle, cx: &mut ViewContext<Workspace>| {
|
||||
|workspace: &mut Workspace,
|
||||
_: &contacts_panel::ToggleFocus,
|
||||
cx: &mut ViewContext<Workspace>| {
|
||||
workspace.toggle_sidebar_item_focus(Side::Right, 0, cx);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user