Add disclosable components into channels
Rename components to more closely match their purpose
This commit is contained in:
parent
2d37128693
commit
bd3ab82dac
10 changed files with 359 additions and 194 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue