feat: mark fully checked collapsed diff folders

This commit is contained in:
Valdemar Lorenzen
2026-10-15 15:04:54 +02:00
parent a93afc7d16
commit 1a02502488
4 changed files with 122 additions and 6 deletions
+14
View File
@@ -370,6 +370,20 @@ impl FilePicker {
})
}
/// Full catalog descendants, independent of filtering and folder expansion.
pub(crate) fn descendant_catalog_indices<'a>(
&'a self,
path: &'a Path,
) -> impl Iterator<Item = usize> + 'a {
let start = self
.nodes
.partition_point(|node| node.path.as_path() <= path);
self.nodes[start..]
.iter()
.take_while(move |node| node.path.starts_with(path))
.filter_map(|node| node.catalog_index)
}
fn selected_node(&self) -> Option<usize> {
self.rows.get(self.selected).map(|row| row.node)
}