summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-08 05:10:57 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-08 05:10:57 -0800
commit29640f4e95517ab2bfb89c474625cf80ae576b39 (patch)
treee164f495a35f9778770bc62cbcd5cdc8c9a61fd2 /MobileCydia.mm
parentfca2f596a14fdca1a4c01e0220cee28303ba004a (diff)
Slightly clean up unloadData logic ordering.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm12
1 files changed, 7 insertions, 5 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index c304ce5..ee4a96f 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -6403,16 +6403,18 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
}
- (void) unloadData {
- UIViewController *selected([self selectedViewController]);
+ [super unloadData];
+
for (UINavigationController *controller in [self viewControllers])
[controller unloadData];
- [selected reloadData];
+ if (UIViewController *selected = [self selectedViewController])
+ [selected reloadData];
- if (UIViewController *unselected = [self unselectedViewController])
+ if (UIViewController *unselected = [self unselectedViewController]) {
+ [unselected unloadData];
[unselected reloadData];
-
- [super unloadData];
+ }
}
- (void) dealloc {