extensions_ui: Remove dependency on theme_selector
(#21023)
This PR removes the dependency on `theme_selector` from `extensions_ui`, as we can just dispatch the action instead. Release Notes: - N/A
This commit is contained in:
parent
b102a40e04
commit
af34953bc3
3 changed files with 9 additions and 12 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -4233,7 +4233,6 @@ dependencies = [
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"snippet_provider",
|
"snippet_provider",
|
||||||
"theme",
|
"theme",
|
||||||
"theme_selector",
|
|
||||||
"ui",
|
"ui",
|
||||||
"util",
|
"util",
|
||||||
"vim_mode_setting",
|
"vim_mode_setting",
|
||||||
|
|
|
@ -38,7 +38,6 @@ settings.workspace = true
|
||||||
smallvec.workspace = true
|
smallvec.workspace = true
|
||||||
snippet_provider.workspace = true
|
snippet_provider.workspace = true
|
||||||
theme.workspace = true
|
theme.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
|
||||||
|
|
|
@ -17,9 +17,9 @@ use editor::{Editor, EditorElement, EditorStyle};
|
||||||
use extension_host::{ExtensionManifest, ExtensionOperation, ExtensionStore};
|
use extension_host::{ExtensionManifest, ExtensionOperation, ExtensionStore};
|
||||||
use fuzzy::{match_strings, StringMatchCandidate};
|
use fuzzy::{match_strings, StringMatchCandidate};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
actions, uniform_list, AppContext, EventEmitter, Flatten, FocusableView, InteractiveElement,
|
actions, uniform_list, Action, AppContext, EventEmitter, Flatten, FocusableView,
|
||||||
KeyContext, ParentElement, Render, Styled, Task, TextStyle, UniformListScrollHandle, View,
|
InteractiveElement, KeyContext, ParentElement, Render, Styled, Task, TextStyle,
|
||||||
ViewContext, VisualContext, WeakView, WindowContext,
|
UniformListScrollHandle, View, ViewContext, VisualContext, WeakView, WindowContext,
|
||||||
};
|
};
|
||||||
use num_format::{Locale, ToFormattedString};
|
use num_format::{Locale, ToFormattedString};
|
||||||
use project::DirectoryLister;
|
use project::DirectoryLister;
|
||||||
|
@ -254,14 +254,13 @@ impl ExtensionsPage {
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
if !themes.is_empty() {
|
if !themes.is_empty() {
|
||||||
workspace
|
workspace
|
||||||
.update(cx, |workspace, cx| {
|
.update(cx, |_workspace, cx| {
|
||||||
theme_selector::toggle(
|
cx.dispatch_action(
|
||||||
workspace,
|
zed_actions::theme_selector::Toggle {
|
||||||
&zed_actions::theme_selector::Toggle {
|
|
||||||
themes_filter: Some(themes),
|
themes_filter: Some(themes),
|
||||||
},
|
}
|
||||||
cx,
|
.boxed_clone(),
|
||||||
)
|
);
|
||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue