Add disclosable components into channels

Rename components to more closely match their purpose
This commit is contained in:
Mikayla 2023-08-19 05:18:53 -07:00
parent 2d37128693
commit bd3ab82dac
No known key found for this signature in database
10 changed files with 359 additions and 194 deletions

View file

@ -114,6 +114,16 @@ impl ChannelStore {
}
}
pub fn has_children(&self, channel_id: ChannelId) -> bool {
self.channel_paths.iter().any(|path| {
if let Some(ix) = path.iter().position(|id| *id == channel_id) {
path.len() > ix + 1
} else {
false
}
})
}
pub fn channel_count(&self) -> usize {
self.channel_paths.len()
}