diff --git a/Signal/src/ViewControllers/ColorPickerViewController.swift b/Signal/src/ViewControllers/ColorPickerViewController.swift index d7853e43e..c18fdd48f 100644 --- a/Signal/src/ViewControllers/ColorPickerViewController.swift +++ b/Signal/src/ViewControllers/ColorPickerViewController.swift @@ -429,7 +429,7 @@ private class MockConversationViewItem: NSObject, ConversationViewItem { return 2 } - func firstValidGalleryAttachment() -> TSAttachmentStream? { + func firstValidAlbumAttachment() -> TSAttachmentStream? { owsFailDebug("unexpected invocation") return nil } diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m index fbbfeddc7..b0f17e668 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m @@ -241,7 +241,7 @@ const UIDataDetectorTypes kOWSAllowedDataDetectorTypes case OWSMessageCellType_ContactShare: return NO; case OWSMessageCellType_MediaAlbum: - // Is there a gallery title? + // Is there an album title? return self.hasBodyText; } } @@ -1414,9 +1414,9 @@ const UIDataDetectorTypes kOWSAllowedDataDetectorTypes OWSAssertDebug(self.viewItem.mediaAlbumItems.count > 0); // For now, use first valid attachment. - TSAttachmentStream *_Nullable attachmentStream = self.viewItem.firstValidGalleryAttachment; + TSAttachmentStream *_Nullable attachmentStream = self.viewItem.firstValidAlbumAttachment; if (!attachmentStream) { - OWSLogInfo(@"Ignoring tap on gallery without any valid attachments."); + OWSLogInfo(@"Ignoring tap on album without any valid attachments."); return; } diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.h b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.h index b5ec95171..1004ee1bc 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.h +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.h @@ -144,7 +144,7 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType); // For other view views (like the typing indicator), this is a unique, stable string. - (NSString *)itemId; -- (nullable TSAttachmentStream *)firstValidGalleryAttachment; +- (nullable TSAttachmentStream *)firstValidAlbumAttachment; @end diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m index d63d294aa..a1bcefc85 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m @@ -409,7 +409,7 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType) } } -- (nullable TSAttachmentStream *)firstValidGalleryAttachment +- (nullable TSAttachmentStream *)firstValidAlbumAttachment { OWSAssertDebug(self.mediaAlbumItems.count > 0); @@ -575,9 +575,9 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType) NSArray *mediaAlbumItems = [self mediaAlbumItemsForAttachments:attachments]; self.mediaAlbumItems = mediaAlbumItems; self.messageCellType = OWSMessageCellType_MediaAlbum; - NSString *_Nullable galleryTitle = [message bodyTextWithTransaction:transaction]; - if (galleryTitle) { - self.displayableBodyText = [self displayableBodyTextForText:galleryTitle interactionId:message.uniqueId]; + NSString *_Nullable albumTitle = [message bodyTextWithTransaction:transaction]; + if (albumTitle) { + self.displayableBodyText = [self displayableBodyTextForText:albumTitle interactionId:message.uniqueId]; } return; } @@ -899,7 +899,7 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType) break; } case OWSMessageCellType_MediaAlbum: { - OWSFailDebug(@"Can't copy media gallery"); + OWSFailDebug(@"Can't copy media album"); break; } } @@ -952,7 +952,7 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType) } } if (attachmentStreams.count < 1) { - OWSFailDebug(@"Can't share media gallery; no valid items."); + OWSFailDebug(@"Can't share media album; no valid items."); return; } [AttachmentSharing showShareUIForAttachments:attachmentStreams completion:nil]; @@ -1126,7 +1126,7 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType) } case OWSMessageCellType_MediaAlbum: // TODO: I suspect we need separate "can save media", "can share media", etc. methods. - return self.firstValidGalleryAttachment != nil; + return self.firstValidAlbumAttachment != nil; } }