Merge tag '2.13.4.0'
// FREEBIE
This commit is contained in:
commit
bca736a2b7
@ -169,24 +169,16 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
|
||||
UIViewController *viewController =
|
||||
[[UIStoryboard storyboardWithName:@"Launch Screen" bundle:nil] instantiateInitialViewController];
|
||||
|
||||
BOOL shouldShowUpgradeLabel = NO;
|
||||
NSString *lastAppVersion = AppVersion.instance.lastAppVersion;
|
||||
NSString *lastLaunchedAppVersion = 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.
|
||||
if (mayNeedUpgrade && !hasCompletedUpgrade) {
|
||||
shouldShowUpgradeLabel = YES;
|
||||
}
|
||||
DDLogInfo(@"%@ shouldShowUpgradeLabel: %d, %d -> %d",
|
||||
self.tag,
|
||||
mayNeedUpgrade,
|
||||
hasCompletedUpgrade,
|
||||
shouldShowUpgradeLabel);
|
||||
if (shouldShowUpgradeLabel) {
|
||||
NSString *kLastVersionWithDatabaseViewChange = @"2.13.0";
|
||||
BOOL mayNeedUpgrade = ([TSAccountManager isRegistered] && lastLaunchedAppVersion
|
||||
&& (!lastCompletedLaunchAppVersion ||
|
||||
[VersionMigrations isVersion:lastCompletedLaunchAppVersion
|
||||
lessThan:kLastVersionWithDatabaseViewChange]));
|
||||
DDLogInfo(@"%@ mayNeedUpgrade: %d", self.tag, mayNeedUpgrade);
|
||||
if (mayNeedUpgrade) {
|
||||
UIView *rootView = viewController.view;
|
||||
UIImageView *iconView = nil;
|
||||
for (UIView *subview in viewController.view.subviews) {
|
||||
|
||||
@ -59,6 +59,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
actionBlock:^{
|
||||
[DebugUIMessages sendTextMessages:1000 thread:thread];
|
||||
}],
|
||||
[OWSTableItem itemWithTitle:@"Send 3,000 messages (1/sec.)"
|
||||
actionBlock:^{
|
||||
[DebugUIMessages sendTextMessages:3000 thread:thread];
|
||||
}],
|
||||
[OWSTableItem itemWithTitle:@"Send 10 tiny attachments"
|
||||
actionBlock:^{
|
||||
[DebugUIMessages sendTinyAttachments:10 thread:thread];
|
||||
@ -71,6 +75,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
actionBlock:^{
|
||||
[DebugUIMessages sendTinyAttachments:1000 thread:thread];
|
||||
}],
|
||||
[OWSTableItem itemWithTitle:@"Send 3,000 tiny attachments"
|
||||
actionBlock:^{
|
||||
[DebugUIMessages sendTinyAttachments:3000 thread:thread];
|
||||
}],
|
||||
[OWSTableItem itemWithTitle:@"Create 10 fake messages"
|
||||
actionBlock:^{
|
||||
[DebugUIMessages sendFakeMessages:10 thread:thread];
|
||||
|
||||
@ -18,4 +18,6 @@
|
||||
|
||||
+ (BOOL)isVersion:(NSString *)thisVersionString atLeast:(NSString *)thatVersionString;
|
||||
|
||||
+ (BOOL)isVersion:(NSString *)thisVersionString lessThan:(NSString *)thatVersionString;
|
||||
|
||||
@end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user