]> git.saurik.com Git - cydia.git/commitdiff
Only do uicache during installation.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 2 Apr 2011 07:41:09 +0000 (00:41 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 2 Apr 2011 07:41:09 +0000 (00:41 -0700)
MobileCydia.mm

index 1f2fcddc0b7c973f5e961ab7e04b3f13f4b853d7..01b8c3d5e48a627241fb7c2cfb5bca56ae5db534 100644 (file)
@@ -5332,12 +5332,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     ] autorelease];
 }
 
-- (void) uicache {
-    _trace();
-    system("su -c /usr/bin/uicache mobile");
-    _trace();
-}
-
 - (void) invoke:(NSInvocation *)invocation withTitle:(NSString *)title {
     UpdateExternalStatus(1);
 
@@ -5415,11 +5409,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
         case 4: [progress_ setFinish:UCLocalize("REBOOT_DEVICE")]; break;
     }
 
-    UIProgressHUD *hud([delegate_ addProgressHUD]);
-    [hud setText:UCLocalize("LOADING")];
-    [self yieldToSelector:@selector(uicache)];
-    [delegate_ removeProgressHUD:hud];
-
     UpdateExternalStatus(Finish_ == 0 ? 0 : 2);
 
     [progress_ setRunning:false];
@@ -9690,9 +9679,23 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
     }
 }
 
+- (void) _uicache {
+    _trace();
+    system("su -c /usr/bin/uicache mobile");
+    _trace();
+}
+
+- (void) uicache {
+    UIProgressHUD *hud([self addProgressHUD]);
+    [hud setText:UCLocalize("LOADING")];
+    [self yieldToSelector:@selector(_uicache)];
+    [self removeProgressHUD:hud];
+}
+
 - (void) perform_ {
     [database_ perform];
     [self performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES];
+    [self performSelectorOnMainThread:@selector(uicache) withObject:nil waitUntilDone:YES];
 }
 
 - (void) confirmWithNavigationController:(UINavigationController *)navigation {