Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

extensions_ui: Remove dependency on `theme_selector` (#21023)

Marshall Bowersaf34953bc33f
diff --git a/Cargo.lock b/Cargo.lock
index 66155eda62f..34bccbc8b42 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4233,7 +4233,6 @@ dependencies = [
"smallvec",
"snippet_provider",
"theme",
- "theme_selector",
"ui",
"util",
"vim_mode_setting",
diff --git a/crates/extensions_ui/Cargo.toml b/crates/extensions_ui/Cargo.toml
index ce345ca2dba..e8de7c3f129 100644
--- a/crates/extensions_ui/Cargo.toml
+++ b/crates/extensions_ui/Cargo.toml
@@ -38,7 +38,6 @@ settings.workspace = true
smallvec.workspace = true
snippet_provider.workspace = true
theme.workspace = true
-theme_selector.workspace = true
ui.workspace = true
util.workspace = true
vim_mode_setting.workspace = true
diff --git a/crates/extensions_ui/src/extensions_ui.rs b/crates/extensions_ui/src/extensions_ui.rs
index ac2e147796e..077d80b9b86 100644
--- a/crates/extensions_ui/src/extensions_ui.rs
+++ b/crates/extensions_ui/src/extensions_ui.rs
@@ -17,9 +17,9 @@ use editor::{Editor, EditorElement, EditorStyle};
use extension_host::{ExtensionManifest, ExtensionOperation, ExtensionStore};
use fuzzy::{match_strings, StringMatchCandidate};
use gpui::{
- actions, uniform_list, AppContext, EventEmitter, Flatten, FocusableView, InteractiveElement,
- KeyContext, ParentElement, Render, Styled, Task, TextStyle, UniformListScrollHandle, View,
- ViewContext, VisualContext, WeakView, WindowContext,
+ actions, uniform_list, Action, AppContext, EventEmitter, Flatten, FocusableView,
+ InteractiveElement, KeyContext, ParentElement, Render, Styled, Task, TextStyle,
+ UniformListScrollHandle, View, ViewContext, VisualContext, WeakView, WindowContext,
};
use num_format::{Locale, ToFormattedString};
use project::DirectoryLister;
@@ -254,14 +254,13 @@ impl ExtensionsPage {
.collect::<Vec<_>>();
if !themes.is_empty() {
workspace
- .update(cx, |workspace, cx| {
- theme_selector::toggle(
- workspace,
- &zed_actions::theme_selector::Toggle {
+ .update(cx, |_workspace, cx| {
+ cx.dispatch_action(
+ zed_actions::theme_selector::Toggle {
themes_filter: Some(themes),
- },
- cx,
- )
+ }
+ .boxed_clone(),
+ );
})
.ok();
}