From: Grant Paul <chpwn@chpwn.com> Date: Wed, 2 Feb 2011 08:30:38 +0000 (-0800) Subject: Workaround to fix the Settings Controller popup on initial launch. X-Git-Tag: v1.1.0%b1~367^2~4 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/0c1cb67a559b2077dddedf7eab3251a3e4cc0812 Workaround to fix the Settings Controller popup on initial launch. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 0c9634b5..5a5afed2 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8927,13 +8927,15 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [tabbar_ setUpdateDelegate:self]; } -- (void)showEmulatedLoadingControllerInView:(UIView *)view { +- (CYEmulatedLoadingController *)showEmulatedLoadingControllerInView:(UIView *)view { static CYEmulatedLoadingController *fake = [[CYEmulatedLoadingController alloc] init]; if (view != nil) { [view addSubview:[fake view]]; } else { [[fake view] removeFromSuperview]; } + + return fake; } - (void) applicationDidFinishLaunching:(id)unused { @@ -9000,8 +9002,19 @@ _trace(); - (void) loadData { _trace(); if (Role_ == nil) { - [self showSettings]; + [window_ setUserInteractionEnabled:YES]; + + SettingsController *role = [[[SettingsController alloc] initWithDatabase:database_ delegate:self] autorelease]; + CYNavigationController *nav = [[[CYNavigationController alloc] initWithRootViewController:role] autorelease]; + if (IsWildcat_) + [nav setModalPresentationStyle:UIModalPresentationFormSheet]; + [[self showEmulatedLoadingControllerInView:window_] presentModalViewController:nav animated:YES]; + return; + } else { + if ([[self showEmulatedLoadingControllerInView:window_] modalViewController] != nil) + [[self showEmulatedLoadingControllerInView:window_] dismissModalViewControllerAnimated:YES]; + [window_ setUserInteractionEnabled:NO]; } [self reloadData];