Show database upgrade warning while launching v2.25 or later.

pull/1/head
Matthew Chen 7 years ago
parent ec180e8b6d
commit 3233554683

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

Loading…
Cancel
Save