Remove unused code and fix compiler warnings
Some checks failed
Build and Release / build-and-release (push) Failing after 1m22s
Some checks failed
Build and Release / build-and-release (push) Failing after 1m22s
This commit is contained in:
@@ -39,7 +39,6 @@ pub struct AppState {
|
||||
pub struct FlattenedItem {
|
||||
pub node: FileTreeNode,
|
||||
pub depth: usize,
|
||||
pub is_expanded: bool,
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
@@ -120,20 +119,6 @@ impl AppState {
|
||||
self.flattened_items.get(self.selected_index)
|
||||
}
|
||||
|
||||
pub fn toggle_expand(&mut self) {
|
||||
if let Some(item) = self.get_selected_item() {
|
||||
if item.node.is_dir {
|
||||
let path = item.node.path.clone();
|
||||
if self.expanded_dirs.contains(&path) {
|
||||
self.expanded_dirs.remove(&path);
|
||||
} else {
|
||||
self.expanded_dirs.insert(path);
|
||||
}
|
||||
self.rebuild_flattened_items();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn collapse_selected(&mut self) {
|
||||
if let Some(item) = self.get_selected_item() {
|
||||
if item.node.is_dir {
|
||||
@@ -167,10 +152,6 @@ impl AppState {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn clear_marks(&mut self) {
|
||||
self.marked_files.clear();
|
||||
}
|
||||
|
||||
pub fn clear_playlist(&mut self) {
|
||||
self.playlist.clear();
|
||||
self.playlist_index = 0;
|
||||
@@ -469,7 +450,6 @@ fn flatten_tree(nodes: &[FileTreeNode], depth: usize, expanded_dirs: &HashSet<Pa
|
||||
result.push(FlattenedItem {
|
||||
node: node.clone(),
|
||||
depth,
|
||||
is_expanded,
|
||||
});
|
||||
|
||||
if node.is_dir && !node.children.is_empty() && is_expanded {
|
||||
|
||||
Reference in New Issue
Block a user