|
|
@ -15,6 +15,7 @@
|
|
|
|
#import "UIUtil.h"
|
|
|
|
#import "UIUtil.h"
|
|
|
|
#import "UIView+OWS.h"
|
|
|
|
#import "UIView+OWS.h"
|
|
|
|
#import <MessageUI/MessageUI.h>
|
|
|
|
#import <MessageUI/MessageUI.h>
|
|
|
|
|
|
|
|
#import <SignalServiceKit/AppVersion.h>
|
|
|
|
#import <SignalServiceKit/PhoneNumberUtil.h>
|
|
|
|
#import <SignalServiceKit/PhoneNumberUtil.h>
|
|
|
|
#import <SignalServiceKit/SignalAccount.h>
|
|
|
|
#import <SignalServiceKit/SignalAccount.h>
|
|
|
|
#import <SignalServiceKit/TSAccountManager.h>
|
|
|
|
#import <SignalServiceKit/TSAccountManager.h>
|
|
|
@ -229,6 +230,41 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
[self showContactAppropriateViews];
|
|
|
|
[self showContactAppropriateViews];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (void)viewDidAppear:(BOOL)animated {
|
|
|
|
|
|
|
|
[super viewDidAppear:animated];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[self showIOSUpgradeNagIfNecessary];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (void)showIOSUpgradeNagIfNecessary {
|
|
|
|
|
|
|
|
// Only show the nag to iOS 8 users.
|
|
|
|
|
|
|
|
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(9, 0)) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Don't show the nag to users who have just launched
|
|
|
|
|
|
|
|
// the app for the first time.
|
|
|
|
|
|
|
|
if (![AppVersion instance].lastAppVersion) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Only show the nag once per update of the app.
|
|
|
|
|
|
|
|
NSString *currentAppVersion = [AppVersion instance].currentAppVersion;
|
|
|
|
|
|
|
|
OWSAssert(currentAppVersion.length > 0);
|
|
|
|
|
|
|
|
NSString *lastNagAppVersion = [Environment.preferences iOSUpgradeNagVersion];
|
|
|
|
|
|
|
|
if (lastNagAppVersion &&
|
|
|
|
|
|
|
|
![lastNagAppVersion isEqualToString:currentAppVersion]) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Environment.preferences setIOSUpgradeNagVersion:currentAppVersion];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[OWSAlerts showAlertWithTitle:
|
|
|
|
|
|
|
|
NSLocalizedString(@"UPGRADE_IOS_ALERT_TITLE",
|
|
|
|
|
|
|
|
@"Title for the alert indicating that user should upgrade iOS.")
|
|
|
|
|
|
|
|
message:NSLocalizedString(@"UPGRADE_IOS_ALERT_MESSAGE",
|
|
|
|
|
|
|
|
@"Message for the alert indicating that user should upgrade iOS.")];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#pragma mark - Table Contents
|
|
|
|
#pragma mark - Table Contents
|
|
|
|
|
|
|
|
|
|
|
|
- (void)updateTableContents
|
|
|
|
- (void)updateTableContents
|
|
|
|