refactor: libcosmic rebase with Application API
This commit is contained in:
parent
d243e45094
commit
454894d82f
18 changed files with 1081 additions and 1198 deletions
|
|
@ -85,6 +85,11 @@ impl<Message: 'static> Binder<Message> {
|
|||
.and_then(|storage| storage.remove(id));
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn find_page_by_id(&self, id: &str) -> Option<(crate::Entity, &Info)> {
|
||||
self.info.iter().find(|(_id, info)| info.id == id)
|
||||
}
|
||||
|
||||
/// Registers a new page in the settings panel.
|
||||
pub fn register<P: AutoBind<Message>>(&mut self) -> crate::Insert<Message> {
|
||||
let page = P::default();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue