Skip to content

Commit

Permalink
welcome: Remove dependency on theme_selector (#21024)
Browse files Browse the repository at this point in the history
This PR removes the dependency on `theme_selector` from `welcome`, as we
can just dispatch the action instead.

Release Notes:

- N/A
  • Loading branch information
maxdeviant authored Nov 21, 2024
1 parent 5ee5a1a commit 9d95da5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/welcome/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ project.workspace = true
schemars.workspace = true
serde.workspace = true
settings.workspace = true
theme_selector.workspace = true
ui.workspace = true
util.workspace = true
vim_mode_setting.workspace = true
Expand Down
10 changes: 3 additions & 7 deletions crates/welcome/src/welcome.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod multibuffer_hint;
use client::{telemetry::Telemetry, TelemetrySettings};
use db::kvp::KEY_VALUE_STORE;
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,
WindowContext,
};
Expand Down Expand Up @@ -133,12 +133,8 @@ impl Render for WelcomePage {
"welcome page: change theme".to_string(),
);
this.workspace
.update(cx, |workspace, cx| {
theme_selector::toggle(
workspace,
&Default::default(),
cx,
)
.update(cx, |_workspace, cx| {
cx.dispatch_action(zed_actions::theme_selector::Toggle::default().boxed_clone());
})
.ok();
})),
Expand Down

0 comments on commit 9d95da5

Please sign in to comment.