mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-05 07:54:14 +00:00
update all tabs on id not found
This commit is contained in:
parent
6c4137f2b6
commit
eb6d77328d
@ -209,15 +209,31 @@ impl Tab {
|
||||
}
|
||||
|
||||
pub fn update(&self, id: &str) {
|
||||
if let Some(item) = self.index.borrow().get(id) {
|
||||
// Update item components
|
||||
item.update();
|
||||
match self.index.borrow().get(id) {
|
||||
Some(item) => {
|
||||
// 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())
|
||||
};
|
||||
// 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())
|
||||
};
|
||||
}
|
||||
}
|
||||
// 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())
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user