Add debug UI for multi-image sends.
This commit is contained in:
parent
f6591fac25
commit
ecba67b511
|
@ -481,6 +481,7 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
|
|||
if (message.attachmentIds.count == 0) {
|
||||
return nil;
|
||||
}
|
||||
// TODO: Support multi-image messages.
|
||||
NSString *_Nullable attachmentId = message.attachmentIds.firstObject;
|
||||
if (attachmentId.length == 0) {
|
||||
return nil;
|
||||
|
|
|
@ -398,6 +398,7 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele
|
|||
}
|
||||
|
||||
private func fetchAttachment(transaction: YapDatabaseReadTransaction) -> TSAttachment? {
|
||||
// TODO: Support multi-image messages.
|
||||
guard let attachmentId = message.attachmentIds.firstObject as? String else {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -579,6 +579,7 @@ typedef void (^SendMessageBlock)(SendCompletionBlock completion);
|
|||
return;
|
||||
}
|
||||
|
||||
// TODO: Support multi-image messages.
|
||||
NSString *_Nullable attachmentRecordId = self.outgoingMessage.attachmentIds.firstObject;
|
||||
if (!attachmentRecordId) {
|
||||
OWSLogDebug(@"Ignoring upload progress until outgoing message has an attachment record id");
|
||||
|
|
|
@ -376,11 +376,10 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
|
|||
success:successHandler
|
||||
failure:failureHandler];
|
||||
|
||||
// TODO de-dupe attachment enque logic.
|
||||
if (message.hasAttachments) {
|
||||
// TODO: de-dupe attachment enqueue logic.
|
||||
for (NSString *attachmentId in message.attachmentIds) {
|
||||
OWSUploadOperation *uploadAttachmentOperation =
|
||||
[[OWSUploadOperation alloc] initWithAttachmentId:message.attachmentIds.firstObject
|
||||
dbConnection:self.dbConnection];
|
||||
[[OWSUploadOperation alloc] initWithAttachmentId:attachmentId dbConnection:self.dbConnection];
|
||||
[sendMessageOperation addDependency:uploadAttachmentOperation];
|
||||
[sendingQueue addOperation:uploadAttachmentOperation];
|
||||
}
|
||||
|
|
|
@ -609,6 +609,7 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
|
|||
}
|
||||
|
||||
// Prefer a URL provider if available
|
||||
// TODO: Support multi-image messages.
|
||||
if let preferredAttachment = attachments.first(where: { (attachment: Any) -> Bool in
|
||||
guard let itemProvider = attachment as? NSItemProvider else {
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue