Sketch out the backup restore view.

This commit is contained in:
Matthew Chen 2018-11-21 16:39:40 -08:00
parent 156aa8419f
commit d44a8f9996
1 changed files with 3 additions and 1 deletions

View File

@ -1264,6 +1264,7 @@ static NSTimeInterval launchStartedAt;
OWSLogInfo(@"Presenting app %.2f seconds after launch started.", startupDuration); OWSLogInfo(@"Presenting app %.2f seconds after launch started.", startupDuration);
UIViewController *rootViewController; UIViewController *rootViewController;
BOOL navigationBarHidden = NO;
if ([self.tsAccountManager isRegistered]) { if ([self.tsAccountManager isRegistered]) {
if (self.backup.hasPendingRestoreDecision) { if (self.backup.hasPendingRestoreDecision) {
rootViewController = [BackupRestoreViewController new]; rootViewController = [BackupRestoreViewController new];
@ -1272,11 +1273,12 @@ static NSTimeInterval launchStartedAt;
} }
} else { } else {
rootViewController = [RegistrationViewController new]; rootViewController = [RegistrationViewController new];
navigationBarHidden = YES;
} }
OWSAssertDebug(rootViewController); OWSAssertDebug(rootViewController);
OWSNavigationController *navigationController = OWSNavigationController *navigationController =
[[OWSNavigationController alloc] initWithRootViewController:rootViewController]; [[OWSNavigationController alloc] initWithRootViewController:rootViewController];
navigationController.navigationBarHidden = YES; navigationController.navigationBarHidden = navigationBarHidden;
self.window.rootViewController = navigationController; self.window.rootViewController = navigationController;
[AppUpdateNag.sharedInstance showAppUpgradeNagIfNecessary]; [AppUpdateNag.sharedInstance showAppUpgradeNagIfNecessary];