|
|
@ -194,7 +194,7 @@ static NSTimeInterval launchStartedAt;
|
|
|
|
mainWindow.rootViewController = [LoadingViewController new];
|
|
|
|
mainWindow.rootViewController = [LoadingViewController new];
|
|
|
|
[mainWindow makeKeyAndVisible];
|
|
|
|
[mainWindow makeKeyAndVisible];
|
|
|
|
|
|
|
|
|
|
|
|
LKAppMode appMode = [self getCurrentAppMode];
|
|
|
|
LKAppMode appMode = [LKAppModeManager getAppModeOrSystemDefault];
|
|
|
|
[self adaptAppMode:appMode];
|
|
|
|
[self adaptAppMode:appMode];
|
|
|
|
|
|
|
|
|
|
|
|
if (@available(iOS 11, *)) {
|
|
|
|
if (@available(iOS 11, *)) {
|
|
|
@ -245,7 +245,7 @@ static NSTimeInterval launchStartedAt;
|
|
|
|
|
|
|
|
|
|
|
|
[self ensureRootViewController];
|
|
|
|
[self ensureRootViewController];
|
|
|
|
|
|
|
|
|
|
|
|
LKAppMode appMode = [self getCurrentAppMode];
|
|
|
|
LKAppMode appMode = [LKAppModeManager getAppModeOrSystemDefault];
|
|
|
|
[self adaptAppMode:appMode];
|
|
|
|
[self adaptAppMode:appMode];
|
|
|
|
|
|
|
|
|
|
|
|
[AppReadiness runNowOrWhenAppDidBecomeReady:^{
|
|
|
|
[AppReadiness runNowOrWhenAppDidBecomeReady:^{
|
|
|
@ -734,12 +734,6 @@ static NSTimeInterval launchStartedAt;
|
|
|
|
[NSNotificationCenter.defaultCenter postNotificationName:NSNotification.appModeChanged object:nil];
|
|
|
|
[NSNotificationCenter.defaultCenter postNotificationName:NSNotification.appModeChanged object:nil];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (LKAppMode)getCurrentAppMode
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
LKAppMode appMode = [self getAppModeOrSystemDefault];
|
|
|
|
|
|
|
|
return appMode;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (void)setCurrentAppMode:(LKAppMode)appMode
|
|
|
|
- (void)setCurrentAppMode:(LKAppMode)appMode
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[NSUserDefaults.standardUserDefaults setInteger:appMode forKey:@"appMode"];
|
|
|
|
[NSUserDefaults.standardUserDefaults setInteger:appMode forKey:@"appMode"];
|
|
|
@ -749,7 +743,7 @@ static NSTimeInterval launchStartedAt;
|
|
|
|
- (void)setAppModeToSystemDefault
|
|
|
|
- (void)setAppModeToSystemDefault
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[NSUserDefaults.standardUserDefaults removeObjectForKey:@"appMode"];
|
|
|
|
[NSUserDefaults.standardUserDefaults removeObjectForKey:@"appMode"];
|
|
|
|
LKAppMode appMode = [self getCurrentAppMode];
|
|
|
|
LKAppMode appMode = [LKAppModeManager getAppModeOrSystemDefault];
|
|
|
|
[self adaptAppMode:appMode];
|
|
|
|
[self adaptAppMode:appMode];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|