|
|
@ -260,11 +260,13 @@ typedef void (^SendMessageBlock)(SendCompletionBlock completion);
|
|
|
|
|
|
|
|
|
|
|
|
#pragma mark - AttachmentApprovalViewControllerDelegate
|
|
|
|
#pragma mark - AttachmentApprovalViewControllerDelegate
|
|
|
|
|
|
|
|
|
|
|
|
- (void)attachmentApproval:(AttachmentApprovalViewController *)approvalViewController
|
|
|
|
- (void)attachmentApproval:(AttachmentApprovalViewController *_Nonnull)attachmentApproval
|
|
|
|
didApproveAttachments:(NSArray<SignalAttachment *> *)attachments
|
|
|
|
didApproveAttachments:(NSArray<SignalAttachment *> *_Nonnull)attachments
|
|
|
|
|
|
|
|
messageText:(NSString *_Nullable)messageText
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[ThreadUtil addThreadToProfileWhitelistIfEmptyContactThread:self.thread];
|
|
|
|
[ThreadUtil addThreadToProfileWhitelistIfEmptyContactThread:self.thread];
|
|
|
|
[self tryToSendMessageWithBlock:^(SendCompletionBlock sendCompletion) {
|
|
|
|
[self
|
|
|
|
|
|
|
|
tryToSendMessageWithBlock:^(SendCompletionBlock sendCompletion) {
|
|
|
|
OWSAssertIsOnMainThread();
|
|
|
|
OWSAssertIsOnMainThread();
|
|
|
|
|
|
|
|
|
|
|
|
__block TSOutgoingMessage *outgoingMessage = nil;
|
|
|
|
__block TSOutgoingMessage *outgoingMessage = nil;
|
|
|
@ -274,6 +276,7 @@ typedef void (^SendMessageBlock)(SendCompletionBlock completion);
|
|
|
|
// TODO ALBUMS - send album via SAE
|
|
|
|
// TODO ALBUMS - send album via SAE
|
|
|
|
outgoingMessage = [ThreadUtil sendMessageNonDurablyWithAttachments:attachments
|
|
|
|
outgoingMessage = [ThreadUtil sendMessageNonDurablyWithAttachments:attachments
|
|
|
|
inThread:self.thread
|
|
|
|
inThread:self.thread
|
|
|
|
|
|
|
|
messageBody:messageText
|
|
|
|
quotedReplyModel:nil
|
|
|
|
quotedReplyModel:nil
|
|
|
|
messageSender:self.messageSender
|
|
|
|
messageSender:self.messageSender
|
|
|
|
completion:^(NSError *_Nullable error) {
|
|
|
|
completion:^(NSError *_Nullable error) {
|
|
|
@ -283,7 +286,7 @@ typedef void (^SendMessageBlock)(SendCompletionBlock completion);
|
|
|
|
// This is necessary to show progress.
|
|
|
|
// This is necessary to show progress.
|
|
|
|
self.outgoingMessage = outgoingMessage;
|
|
|
|
self.outgoingMessage = outgoingMessage;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fromViewController:approvalViewController];
|
|
|
|
fromViewController:attachmentApproval];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)attachmentApproval:(AttachmentApprovalViewController *)attachmentApproval
|
|
|
|
- (void)attachmentApproval:(AttachmentApprovalViewController *)attachmentApproval
|
|
|
@ -399,7 +402,7 @@ typedef void (^SendMessageBlock)(SendCompletionBlock completion);
|
|
|
|
[self.progressView autoPinWidthToSuperviewWithMargin:24];
|
|
|
|
[self.progressView autoPinWidthToSuperviewWithMargin:24];
|
|
|
|
[self.progressView autoAlignAxis:ALAxisHorizontal toSameAxisOfView:progressAlert.view withOffset:4];
|
|
|
|
[self.progressView autoAlignAxis:ALAxisHorizontal toSameAxisOfView:progressAlert.view withOffset:4];
|
|
|
|
#ifdef DEBUG
|
|
|
|
#ifdef DEBUG
|
|
|
|
if (@available(iOS 12, *)) {
|
|
|
|
if (@available(iOS 13, *)) {
|
|
|
|
// TODO: Congratulations! You survived to see another iOS release.
|
|
|
|
// TODO: Congratulations! You survived to see another iOS release.
|
|
|
|
OWSFailDebug(@"Make sure the progress view still looks good, and increment the version canary.");
|
|
|
|
OWSFailDebug(@"Make sure the progress view still looks good, and increment the version canary.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|