summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {