Merge branch 'charlesmchen/nudgeDatabaseUpgradeWarning'

pull/1/head
Matthew Chen 7 years ago
commit 023d40e230

@ -416,11 +416,12 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
{ {
NSString *lastLaunchedAppVersion = AppVersion.instance.lastAppVersion; NSString *lastLaunchedAppVersion = AppVersion.instance.lastAppVersion;
NSString *lastCompletedLaunchAppVersion = AppVersion.instance.lastCompletedLaunchAppVersion; NSString *lastCompletedLaunchAppVersion = AppVersion.instance.lastCompletedLaunchAppVersion;
// Every time we change or add a database view in such a way that // Every time we change or add a database view to a large collection or
// might cause a delay on launch, we need to bump this constant. // add a database migration to a large collection, this can delay launch
// so we need to bump this constant.
// //
// We added a database view in v2.23.0. // We added a database migration around all outgoing messages in v2.25.0.
NSString *kLastVersionWithDatabaseViewChange = @"2.23.0"; NSString *kLastVersionWithDatabaseViewChange = @"2.25.0";
BOOL mayNeedUpgrade = ([TSAccountManager isRegistered] && lastLaunchedAppVersion BOOL mayNeedUpgrade = ([TSAccountManager isRegistered] && lastLaunchedAppVersion
&& (!lastCompletedLaunchAppVersion || && (!lastCompletedLaunchAppVersion ||
[VersionMigrations isVersion:lastCompletedLaunchAppVersion [VersionMigrations isVersion:lastCompletedLaunchAppVersion

Loading…
Cancel
Save