clean up
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user