diff options
-rw-r--r-- | MobileCydia.mm | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index f73dce6..e9ff8fc 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8117,15 +8117,25 @@ static _finline void _setHomePage(Cydia *self) { - (void) _updateData { [self _saveConfig]; - /* XXX: this is just stupid */ - if (tag_ != 1 && sections_ != nil) - [sections_ reloadData]; - if (tag_ != 2 && changes_ != nil) - [changes_ reloadData]; - if (tag_ != 4 && search_ != nil) - [search_ reloadData]; - - [(CYNavigationController *)[tabbar_ selectedViewController] reloadData]; + NSMutableSet *tabs([[[NSMutableSet alloc] initWithCapacity:10] autorelease]); + + [tabs addObject:[tabbar_ selectedViewController]]; + + if (sections_ != nil) + [tabs addObject:sections_]; + if (changes_ != nil) + [tabs addObject:changes_]; + if (manage_ != nil) + [tabs addObject:manage_]; + if (search_ != nil) + [tabs addObject:search_]; + if (sources_ != nil) + [tabs addObject:sources_]; + if (installed_ != nil) + [tabs addObject:installed_]; + + for (CYNavigationController *tab in tabs) + [tab reloadData]; [queueDelegate_ queueStatusDidChange]; [[[self queueBadgeController] tabBarItem] setBadgeValue:(Queuing_ ? UCLocalize("Q_D") : nil)]; |