diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index af121ada0..b91d44ca3 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -5,9 +5,9 @@ BuildDetails CarthageVersion - 0.35.0 + 0.34.0 OSXVersion - 10.15.6 + 10.15.5 WebRTCCommit 1445d719bf05280270e9f77576f80f973fd847f8 M73 diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 4faa52ac1..20727a832 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -517,7 +517,7 @@ static NSTimeInterval launchStartedAt; [[[OWSFailedMessagesJob alloc] initWithPrimaryStorage:self.primaryStorage] run]; // Mark all "incomplete" calls as missed, e.g. any incoming or outgoing calls that were not // connected, failed or hung up before the app existed should be marked as missed. - [[[OWSIncompleteCallsJob alloc] initWithPrimaryStorage:self.primaryStorage] run]; +// [[[OWSIncompleteCallsJob alloc] initWithPrimaryStorage:self.primaryStorage] run]; [[[OWSFailedAttachmentDownloadsJob alloc] initWithPrimaryStorage:self.primaryStorage] run]; }); } else { @@ -526,7 +526,7 @@ static NSTimeInterval launchStartedAt; // Unregistered user should have no unread messages. e.g. if you delete your account. [AppEnvironment.shared.notificationPresenter clearAllNotifications]; - [self.socketManager requestSocketOpen]; +// [self.socketManager requestSocketOpen]; UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:[Pastelog class] action:@selector(submitLogs)]; @@ -540,8 +540,8 @@ static NSTimeInterval launchStartedAt; // At this point, potentially lengthy DB locking migrations could be running. // Avoid blocking app launch by putting all further possible DB access in async block dispatch_async(dispatch_get_main_queue(), ^{ - [self.socketManager requestSocketOpen]; - [Environment.shared.contactsManager fetchSystemContactsOnceIfAlreadyAuthorized]; +// [self.socketManager requestSocketOpen]; +// [Environment.shared.contactsManager fetchSystemContactsOnceIfAlreadyAuthorized]; NSString *userPublicKey = self.tsAccountManager.localNumber; diff --git a/SignalMessaging/ViewControllers/OWSViewController.m b/SignalMessaging/ViewControllers/OWSViewController.m index 991c9d575..7e650edb1 100644 --- a/SignalMessaging/ViewControllers/OWSViewController.m +++ b/SignalMessaging/ViewControllers/OWSViewController.m @@ -124,7 +124,9 @@ UIInterfaceOrientationMask DefaultUIInterfaceOrientationMask(void) self.bottomLayoutView = view; if (avoidNotch) { - self.bottomLayoutConstraint = [view autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self.view withOffset:0]; + NSLayoutConstraint *bottomLayoutConstraint = [view.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor]; + [bottomLayoutConstraint setActive:YES]; + self.bottomLayoutConstraint = bottomLayoutConstraint; } else { self.bottomLayoutConstraint = [view autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self.view]; } diff --git a/SignalServiceKit/src/Messages/Attachments/OWSAttachmentDownloads.m b/SignalServiceKit/src/Messages/Attachments/OWSAttachmentDownloads.m index 60f50cbc4..fb850789b 100644 --- a/SignalServiceKit/src/Messages/Attachments/OWSAttachmentDownloads.m +++ b/SignalServiceKit/src/Messages/Attachments/OWSAttachmentDownloads.m @@ -378,19 +378,30 @@ typedef void (^AttachmentDownloadFailure)(NSError *error); }); }; - dispatch_async([OWSDispatch attachmentsQueue], ^{ - [self downloadFromLocation:attachmentPointer.downloadURL - job:job - success:^(NSString *encryptedDataFilePath) { - [self decryptAttachmentPath:encryptedDataFilePath - attachmentPointer:attachmentPointer - success:markAndHandleSuccess - failure:markAndHandleFailure]; - } - failure:^(NSURLSessionTask *_Nullable task, NSError *error) { - markAndHandleFailure(error); - }]; - }); + __block NSUInteger retryCount = 0; + NSUInteger maxRetryCount = 4; + __block void (^attempt)(); + attempt = ^() { + dispatch_async([OWSDispatch attachmentsQueue], ^{ + [self downloadFromLocation:attachmentPointer.downloadURL + job:job + success:^(NSString *encryptedDataFilePath) { + [self decryptAttachmentPath:encryptedDataFilePath + attachmentPointer:attachmentPointer + success:markAndHandleSuccess + failure:markAndHandleFailure]; + } + failure:^(NSURLSessionTask *task, NSError *error) { + if (retryCount == maxRetryCount) { + markAndHandleFailure(error); + } else { + retryCount += 1; + attempt(); + } + }]; + }); + }; + attempt(); } - (void)decryptAttachmentPath:(NSString *)encryptedDataFilePath @@ -630,6 +641,7 @@ typedef void (^AttachmentDownloadFailure)(NSError *error); } successHandler(tempFilePath); }]; + [task resume]; }