Merge remote-tracking branch 'origin/hotfix/2.16.1'

This commit is contained in:
Matthew Chen 2017-09-24 20:49:13 -04:00
commit b4312a5619
4 changed files with 31 additions and 4 deletions

View File

@ -55,7 +55,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2.16.1.2</string>
<string>2.16.1.3</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LOGS_EMAIL</key>

View File

@ -10,5 +10,6 @@ extern NSString *const AppDelegateStoryboardMain;
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (atomic) BOOL isEnvironmentSetup;
@end

View File

@ -490,6 +490,11 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
// Clean up any messages that expired since last launch immediately
// and continue cleaning in the background.
[[OWSDisappearingMessagesJob sharedJob] startIfNecessary];
// TODO remove this once we're sure our app boot process is coherent.
// Currently this happens *before* db registration is complete when
// launching the app directly, but *after* db registration is complete when
// the app is launched in the background, e.g. from a voip notification.
[[OWSProfileManager sharedManager] ensureLocalProfileCached];
// Mark all "attempting out" messages as "unsent", i.e. any messages that were not successfully
@ -749,6 +754,11 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
}
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
if (!self.isEnvironmentSetup) {
OWSFail(@"%@ ignoring %s because environment is not yet set up.", self.tag, __PRETTY_FUNCTION__);
return;
}
[AppStoreRating preventPromptAtNextTest];
[[PushManager sharedManager] application:application didReceiveLocalNotification:notification];
}
@ -756,7 +766,13 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
- (void)application:(UIApplication *)application
handleActionWithIdentifier:(NSString *)identifier
forLocalNotification:(UILocalNotification *)notification
completionHandler:(void (^)())completionHandler {
completionHandler:(void (^)())completionHandler
{
if (!self.isEnvironmentSetup) {
OWSFail(@"%@ ignoring %s because environment is not yet set up.", self.tag, __PRETTY_FUNCTION__);
return;
}
[[PushManager sharedManager] application:application
handleActionWithIdentifier:identifier
forLocalNotification:notification
@ -767,7 +783,13 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
handleActionWithIdentifier:(NSString *)identifier
forLocalNotification:(UILocalNotification *)notification
withResponseInfo:(NSDictionary *)responseInfo
completionHandler:(void (^)())completionHandler {
completionHandler:(void (^)())completionHandler
{
if (!self.isEnvironmentSetup) {
OWSFail(@"%@ ignoring %s because environment is not yet set up.", self.tag, __PRETTY_FUNCTION__);
return;
}
[[PushManager sharedManager] application:application
handleActionWithIdentifier:identifier
forLocalNotification:notification
@ -809,6 +831,10 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
[[OWSMessageReceiver sharedInstance] handleAnyUnprocessedEnvelopesAsync];
[[OWSBatchMessageProcessor sharedInstance] handleAnyUnprocessedEnvelopesAsync];
[[OWSProfileManager sharedManager] ensureLocalProfileCached];
self.isEnvironmentSetup = YES;
[OWSProfileManager.sharedManager fetchLocalUsersProfile];
// Make sure this manager is started.
[OWSReadReceiptManager sharedManager];

View File

@ -1109,7 +1109,7 @@
"PROFILE_VIEW_PROFILE_AVATAR_FIELD" = "Avatar";
/* Description of the user profile. */
"PROFILE_VIEW_PROFILE_DESCRIPTION" = "Je Signal-profiel zal zichtbaar zijn voor je ocntacten, wanneer je nieuwe gesprekken begint, en wanneer je het deelt met andere gebruikers en groepen.";
"PROFILE_VIEW_PROFILE_DESCRIPTION" = "Je Signal-profiel zal zichtbaar zijn voor je contacten, wanneer je nieuwe gesprekken begint, en wanneer je het deelt met andere gebruikers en groepen.";
/* Link to more information about the user profile. */
"PROFILE_VIEW_PROFILE_DESCRIPTION_LINK" = "Tik hier voor meer info.";