shenanigans
This commit is contained in:
@@ -68,20 +68,20 @@ impl PullRequestChangeView {
|
||||
) {
|
||||
let item = &self.file_tree_items[i];
|
||||
match item.kind {
|
||||
| FileTreeItemKind::Directory => {
|
||||
self.file_tree_state
|
||||
.toggle_directory(&item.full_path, &self.file_tree_items);
|
||||
cx.notify();
|
||||
}
|
||||
| FileTreeItemKind::File => {
|
||||
self.selected_file_path = Some(Arc::clone(&item.full_path));
|
||||
self.file_tree_state.highlight_item(i);
|
||||
self.diff_view.update(cx, |diff_view, cx| {
|
||||
diff_view.show_diff_for_file(&item.full_path, cx);
|
||||
});
|
||||
cx.focus_view(&self.diff_view, window);
|
||||
cx.notify();
|
||||
}
|
||||
| FileTreeItemKind::Directory => {
|
||||
self.file_tree_state
|
||||
.toggle_directory(&item.full_path, &self.file_tree_items);
|
||||
cx.notify();
|
||||
}
|
||||
| FileTreeItemKind::File => {
|
||||
self.selected_file_path = Some(Arc::clone(&item.full_path));
|
||||
self.file_tree_state.highlight_item(i);
|
||||
self.diff_view.update(cx, |diff_view, cx| {
|
||||
diff_view.show_diff_for_file(&item.full_path, cx);
|
||||
});
|
||||
cx.focus_view(&self.diff_view, window);
|
||||
cx.notify();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,7 +107,6 @@ impl gpui::Render for PullRequestChangeView {
|
||||
.bg(theme.colors.surface_chrome)
|
||||
.border_r_1()
|
||||
.border_color(theme.colors.border_muted)
|
||||
.p_1()
|
||||
.child(
|
||||
file_tree(self.file_tree_state.clone(), move |i, _, cx| {
|
||||
weak.read(cx).file_tree_items[i].clone()
|
||||
|
||||
Reference in New Issue
Block a user