From: Jay Freeman (saurik) Date: Tue, 8 Mar 2011 07:56:34 +0000 (-0800) Subject: Prefer manual cydia.unload() to automatic modality. X-Git-Tag: v1.1.0%b1~11 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/7c21878133d774334c4c378e29688bc3b19ecbad Prefer manual cydia.unload() to automatic modality. --- diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index 61786da9..c2f280cd 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -380,8 +380,6 @@ float CYScrollViewDecelerationRateNormal; action:@selector(close) ] autorelease]]; - [delegate_ unloadData]; - [[self navigationController] presentModalViewController:navigation animated:YES]; } } diff --git a/MobileCydia.mm b/MobileCydia.mm index 61ffac3f..e5c517e1 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -3904,6 +3904,8 @@ static _H Diversions_; return @"statfs"; else if (selector == @selector(supports:)) return @"supports"; + else if (selector == @selector(unload)) + return @"unload"; else return nil; } @@ -3916,6 +3918,10 @@ static _H Diversions_; return [feature isEqualToString:@"window.open"]; } +- (void) unload { + [delegate_ performSelectorOnMainThread:@selector(unloadData) withObject:nil waitUntilDone:NO]; +} + - (void) addInternalRedirect:(NSString *)from :(NSString *)to { [CydiaWebViewController performSelectorOnMainThread:@selector(addDiversion:) withObject:[[[Diversion alloc] initWithFrom:from to:to] autorelease] waitUntilDone:NO]; }