From: Jay Freeman (saurik) Date: Tue, 8 Mar 2011 12:52:13 +0000 (-0800) Subject: Don't show finish button until it is usable. X-Git-Tag: v1.1.0%b1~5 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/fca2f596a14fdca1a4c01e0220cee28303ba004a Don't show finish button until it is usable. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index f1a15ef6..c304ce5f 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8711,6 +8711,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (void) update_ { [database_ update]; + [self performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES]; } - (void) disemulate { @@ -8790,8 +8791,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { fclose(file); [self detachNewProgressSelector:@selector(update_) toTarget:self forController:nil title:@"UPDATING_SOURCES"]; - - [self reloadData]; } - (void) addTrivialSource:(NSString *)href { @@ -8881,12 +8880,16 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } } +- (void) perform_ { + [database_ perform]; + [self performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES]; +} + - (void) confirmWithNavigationController:(UINavigationController *)navigation { Queuing_ = false; ++locked_; - [self detachNewProgressSelector:@selector(perform) toTarget:database_ forController:navigation title:@"RUNNING"]; + [self detachNewProgressSelector:@selector(perform_) toTarget:self forController:navigation title:@"RUNNING"]; --locked_; - [self reloadData]; } - (void) showSettings {