update is_loading update logic

This commit is contained in:
yggverse 2025-01-21 19:39:44 +02:00
parent 2f22185d6a
commit 88457b3fa0
6 changed files with 41 additions and 90 deletions

View file

@ -288,24 +288,12 @@ impl Tab {
match self.index.borrow().get(&key) {
Some(item) => {
// Update item components
item.update();
// Update tab title on loading indicator inactive
if !item.page.is_loading() {
item.widget.tab_page.set_title(&item.page.title.borrow())
}
}
// Update all tabs
None => {
// update all tabs
for (_, item) in self.index.borrow().iter() {
// Update item components
item.update();
// Update tab title on loading indicator inactive
if !item.page.is_loading() {
item.widget.tab_page.set_title(&item.page.title.borrow())
}
}
}
}