|
|
@ -199,13 +199,22 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
|
|
|
|
[[UIStoryboard storyboardWithName:@"Launch Screen" bundle:nil] instantiateInitialViewController];
|
|
|
|
[[UIStoryboard storyboardWithName:@"Launch Screen" bundle:nil] instantiateInitialViewController];
|
|
|
|
|
|
|
|
|
|
|
|
BOOL shouldShowUpgradeLabel = NO;
|
|
|
|
BOOL shouldShowUpgradeLabel = NO;
|
|
|
|
NSString *previousVersion = AppVersion.instance.lastCompletedLaunchAppVersion;
|
|
|
|
NSString *lastAppVersion = AppVersion.instance.lastAppVersion;
|
|
|
|
|
|
|
|
NSString *lastCompletedLaunchAppVersion = AppVersion.instance.lastCompletedLaunchAppVersion;
|
|
|
|
|
|
|
|
BOOL mayNeedUpgrade = ([TSAccountManager isRegistered] &&
|
|
|
|
|
|
|
|
[VersionMigrations isVersion:lastAppVersion atLeast:@"2.0.0" andLessThan:@"2.13.0"]);
|
|
|
|
|
|
|
|
BOOL hasCompletedUpgrade = (lastCompletedLaunchAppVersion &&
|
|
|
|
|
|
|
|
[VersionMigrations isVersion:lastCompletedLaunchAppVersion atLeast:@"2.13.0"]);
|
|
|
|
|
|
|
|
|
|
|
|
// We added a number of database views in v2.13.0.
|
|
|
|
// We added a number of database views in v2.13.0.
|
|
|
|
if ([TSAccountManager isRegistered] &&
|
|
|
|
if (mayNeedUpgrade && !hasCompletedUpgrade) {
|
|
|
|
[VersionMigrations isVersion:previousVersion atLeast:@"2.0.0" andLessThan:@"2.13.0"]) {
|
|
|
|
|
|
|
|
shouldShowUpgradeLabel = YES;
|
|
|
|
shouldShowUpgradeLabel = YES;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DDLogInfo(@"%@ shouldShowUpgradeLabel: %d", self.tag, shouldShowUpgradeLabel);
|
|
|
|
DDLogInfo(@"%@ shouldShowUpgradeLabel: %d, %d -> %d",
|
|
|
|
|
|
|
|
self.tag,
|
|
|
|
|
|
|
|
mayNeedUpgrade,
|
|
|
|
|
|
|
|
hasCompletedUpgrade,
|
|
|
|
|
|
|
|
shouldShowUpgradeLabel);
|
|
|
|
if (shouldShowUpgradeLabel) {
|
|
|
|
if (shouldShowUpgradeLabel) {
|
|
|
|
UIView *rootView = viewController.view;
|
|
|
|
UIView *rootView = viewController.view;
|
|
|
|
UIImageView *iconView = nil;
|
|
|
|
UIImageView *iconView = nil;
|
|
|
|