feat: mark fully checked collapsed diff folders
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user