diff options
-rw-r--r-- | MobileCydia.mm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 31d4c47..dcbd188 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -987,6 +987,7 @@ static const int PulseInterval_ = 50000; static const NSString *UI_; static int Finish_; +static bool RestartSubstrate_; static NSArray *Finishes_; #define SpringBoard_ "/System/Library/LaunchDaemons/com.apple.SpringBoard.plist" @@ -3683,6 +3684,9 @@ static NSString *Warning_; } - (void) perform { + bool substrate(RestartSubstrate_); + RestartSubstrate_ = false; + NSString *title(UCLocalize("PERFORM_SELECTIONS")); NSMutableArray *before = [NSMutableArray arrayWithCapacity:16]; { @@ -3728,6 +3732,9 @@ static NSString *Warning_; return; } + if (substrate) + RestartSubstrate_ = true; + _system->UnLock(); pkgPackageManager::OrderResult result = manager_->DoInstall(statusfd_); @@ -4472,7 +4479,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (void) complete { if (substrate_) - Finish_ = 2; + RestartSubstrate_ = true; [delegate_ confirmWithNavigationController:[self navigationController]]; } @@ -4989,6 +4996,13 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } } + if (Finish_ < 2) { + if (RestartSubstrate_) + Finish_ = 2; + } + + RestartSubstrate_ = false; + switch (Finish_) { case 0: [close_ setTitle:UCLocalize("RETURN_TO_CYDIA")]; break; /* XXX: Maybe UCLocalize("DONE")? */ case 1: [close_ setTitle:UCLocalize("CLOSE_CYDIA")]; break; |