X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/a23d62b26840d7753f81d4e04810b4db4f70936a..470713ccba97fc9cd0620f11b3a2fd740792410f:/MobileCydia.mm diff --git a/MobileCydia.mm b/MobileCydia.mm index f73dce64..e9ff8fcb 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)];