mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
update all tabs on id not found
This commit is contained in:
parent
6c4137f2b6
commit
eb6d77328d
1 changed files with 24 additions and 8 deletions
|
|
@ -209,7 +209,8 @@ impl Tab {
|
|||
}
|
||||
|
||||
pub fn update(&self, id: &str) {
|
||||
if let Some(item) = self.index.borrow().get(id) {
|
||||
match self.index.borrow().get(id) {
|
||||
Some(item) => {
|
||||
// Update item components
|
||||
item.update();
|
||||
|
||||
|
|
@ -220,6 +221,21 @@ impl Tab {
|
|||
};
|
||||
}
|
||||
}
|
||||
// Update all tabs on ID not found @TODO change initial update method
|
||||
None => {
|
||||
for (_, item) in self.index.borrow().iter() {
|
||||
// Update item components
|
||||
item.update();
|
||||
|
||||
// Update tab title on loading indicator inactive
|
||||
if !item.page_is_loading() {
|
||||
if let Some(title) = item.page_meta_title() {
|
||||
item.gobject().set_title(title.as_str())
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn clean(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue