forked from reya/gpui-native-kit
chore: reduce component overhead (#3)
Reviewed-on: reya/gpui-native-kit#3
This commit is contained in:
@@ -112,9 +112,9 @@ fn drag(visual: &mut VisualTestContext, from: gpui::Point<Pixels>, to: gpui::Poi
|
||||
|
||||
fn register(dock: &Entity<DockState>, tags: &[&'static str], cx: &mut TestAppContext) {
|
||||
cx.update(|cx| {
|
||||
dock.update(cx, |dock, cx| {
|
||||
dock.update(cx, |dock, _cx| {
|
||||
for tag in tags {
|
||||
dock.register_panel(descriptor(tag), cx);
|
||||
dock.register_panel(descriptor(tag));
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -492,9 +492,9 @@ fn activating_a_panel_with_a_right_view_opens_the_sidebar() {
|
||||
let mut cx = TestAppContext::single();
|
||||
let (dock, opened, mut visual) = sidebar_window(&mut cx);
|
||||
cx.update(|cx| {
|
||||
dock.update(cx, |dock, cx| {
|
||||
dock.register_panel(descriptor_with_right_sidebar("overview"), cx);
|
||||
dock.register_panel(descriptor("inbox"), cx);
|
||||
dock.update(cx, |dock, _cx| {
|
||||
dock.register_panel(descriptor_with_right_sidebar("overview"));
|
||||
dock.register_panel(descriptor("inbox"));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -519,9 +519,9 @@ fn closing_the_displayed_tab_falls_back_to_another_right_view() {
|
||||
let mut cx = TestAppContext::single();
|
||||
let (dock, opened, mut visual) = sidebar_window(&mut cx);
|
||||
cx.update(|cx| {
|
||||
dock.update(cx, |dock, cx| {
|
||||
dock.register_panel(descriptor_with_right_sidebar("overview"), cx);
|
||||
dock.register_panel(descriptor_with_right_sidebar("explore"), cx);
|
||||
dock.update(cx, |dock, _cx| {
|
||||
dock.register_panel(descriptor_with_right_sidebar("overview"));
|
||||
dock.register_panel(descriptor_with_right_sidebar("explore"));
|
||||
});
|
||||
});
|
||||
open(&mut visual, &dock, "overview");
|
||||
|
||||
Reference in New Issue
Block a user