This commit is contained in:
2026-09-13 13:36:27 +07:00
parent f8277e4c2e
commit b3991810b6
77 changed files with 96 additions and 5189 deletions
-7
View File
@@ -10,8 +10,6 @@ use super::{RefKind, RepoDetailView};
use crate::views::repo::helpers::{build_tree_items, sorted_worktree_paths, tree_items};
impl RepoDetailView {
/// Check out `name`, a branch or tag picked in the header.
/// Refresh the explorer once the switch completes.
pub(super) fn switch_ref(
&mut self,
kind: RefKind,
@@ -81,7 +79,6 @@ impl RepoDetailView {
task.detach();
}
/// Restore a selector to `previous`, or clear it after a failed switch.
fn restore_selection(
&self,
select: &Entity<ComboboxState<SearchableVec<SharedString>>>,
@@ -95,10 +92,6 @@ impl RepoDetailView {
});
}
/// Refresh the file explorer, preview pane and commit list after a successful switch.
/// The selectors were already updated by [`Self::switch_ref`].
/// [`Self::switching_ref`] stays set until this reload finishes.
/// A second switch cannot interleave.
fn reload_worktree(&mut self, cx: &mut Context<Self>) {
let Some(worktree) = self.worktree.clone() else {
return;