mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 15:44:31 +03:00
Respect the setting to show/hide the assistant and chat panels (#3909)
This PR makes it so we respect the setting to show/hide the assistant and chat panels. Resolves https://github.com/zed-industries/community/issues/2370. Release Notes: - Fixed an issue where the settings to show/hide certain panels were not respected.
This commit is contained in:
parent
bf11a04410
commit
c8dcc80a1f
@ -1286,8 +1286,8 @@ impl Panel for AssistantPanel {
|
||||
}
|
||||
}
|
||||
|
||||
fn icon(&self, _cx: &WindowContext) -> Option<Icon> {
|
||||
Some(Icon::Ai)
|
||||
fn icon(&self, cx: &WindowContext) -> Option<Icon> {
|
||||
Some(Icon::Ai).filter(|_| AssistantSettings::get_global(cx).button)
|
||||
}
|
||||
|
||||
fn icon_tooltip(&self, _cx: &WindowContext) -> Option<&'static str> {
|
||||
|
@ -607,8 +607,12 @@ impl Panel for ChatPanel {
|
||||
"ChatPanel"
|
||||
}
|
||||
|
||||
fn icon(&self, _cx: &WindowContext) -> Option<ui::Icon> {
|
||||
Some(ui::Icon::MessageBubbles)
|
||||
fn icon(&self, cx: &WindowContext) -> Option<ui::Icon> {
|
||||
if !is_channels_feature_enabled(cx) {
|
||||
return None;
|
||||
}
|
||||
|
||||
Some(ui::Icon::MessageBubbles).filter(|_| ChatPanelSettings::get_global(cx).button)
|
||||
}
|
||||
|
||||
fn icon_tooltip(&self, _cx: &WindowContext) -> Option<&'static str> {
|
||||
|
Loading…
Reference in New Issue
Block a user