welcome: Remove dependency on theme_selector
(#21024)
This PR removes the dependency on `theme_selector` from `welcome`, as we can just dispatch the action instead. Release Notes: - N/A
This commit is contained in:
parent
5ee5a1a51e
commit
9d95da56c3
3 changed files with 3 additions and 9 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -14422,7 +14422,6 @@ dependencies = [
|
||||||
"schemars",
|
"schemars",
|
||||||
"serde",
|
"serde",
|
||||||
"settings",
|
"settings",
|
||||||
"theme_selector",
|
|
||||||
"ui",
|
"ui",
|
||||||
"util",
|
"util",
|
||||||
"vim_mode_setting",
|
"vim_mode_setting",
|
||||||
|
|
|
@ -27,7 +27,6 @@ project.workspace = true
|
||||||
schemars.workspace = true
|
schemars.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
settings.workspace = true
|
settings.workspace = true
|
||||||
theme_selector.workspace = true
|
|
||||||
ui.workspace = true
|
ui.workspace = true
|
||||||
util.workspace = true
|
util.workspace = true
|
||||||
vim_mode_setting.workspace = true
|
vim_mode_setting.workspace = true
|
||||||
|
|
|
@ -5,7 +5,7 @@ mod multibuffer_hint;
|
||||||
use client::{telemetry::Telemetry, TelemetrySettings};
|
use client::{telemetry::Telemetry, TelemetrySettings};
|
||||||
use db::kvp::KEY_VALUE_STORE;
|
use db::kvp::KEY_VALUE_STORE;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
actions, svg, AppContext, EventEmitter, FocusHandle, FocusableView, InteractiveElement,
|
actions, svg, Action, AppContext, EventEmitter, FocusHandle, FocusableView, InteractiveElement,
|
||||||
ParentElement, Render, Styled, Subscription, Task, View, ViewContext, VisualContext, WeakView,
|
ParentElement, Render, Styled, Subscription, Task, View, ViewContext, VisualContext, WeakView,
|
||||||
WindowContext,
|
WindowContext,
|
||||||
};
|
};
|
||||||
|
@ -133,12 +133,8 @@ impl Render for WelcomePage {
|
||||||
"welcome page: change theme".to_string(),
|
"welcome page: change theme".to_string(),
|
||||||
);
|
);
|
||||||
this.workspace
|
this.workspace
|
||||||
.update(cx, |workspace, cx| {
|
.update(cx, |_workspace, cx| {
|
||||||
theme_selector::toggle(
|
cx.dispatch_action(zed_actions::theme_selector::Toggle::default().boxed_clone());
|
||||||
workspace,
|
|
||||||
&Default::default(),
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
})),
|
})),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue