mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Refine appearance of quoted reply message cells.
This commit is contained in:
parent
5235f6eee9
commit
08ba3852cd
|
@ -75,15 +75,32 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
- (BOOL)hasQuotedAttachment
|
- (BOOL)hasQuotedAttachment
|
||||||
{
|
{
|
||||||
return self.quotedMessage.contentType.length > 0;
|
return (self.quotedMessage.contentType.length > 0
|
||||||
|
&& ![NSObject isNullableObject:self.quotedMessage.contentType equalTo:OWSMimeTypeOversizeTextMessage]);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)hasQuotedAttachmentThumbnail
|
- (BOOL)hasQuotedAttachmentThumbnail
|
||||||
{
|
{
|
||||||
return (self.quotedMessage.contentType.length > 0 &&
|
return (self.quotedMessage.contentType.length > 0
|
||||||
|
&& ![NSObject isNullableObject:self.quotedMessage.contentType equalTo:OWSMimeTypeOversizeTextMessage] &&
|
||||||
[TSAttachmentStream hasThumbnailForMimeType:self.quotedMessage.contentType]);
|
[TSAttachmentStream hasThumbnailForMimeType:self.quotedMessage.contentType]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *)quotedSnippet
|
||||||
|
{
|
||||||
|
if (self.displayableQuotedText.displayText.length > 0) {
|
||||||
|
return self.displayableQuotedText.displayText;
|
||||||
|
} else {
|
||||||
|
NSString *mimeType = self.quotedMessage.contentType;
|
||||||
|
|
||||||
|
if (mimeType.length > 0) {
|
||||||
|
return [TSAttachment emojiForMimeType:mimeType];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return @"";
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
- (void)createContents
|
- (void)createContents
|
||||||
|
@ -282,21 +299,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
return [UIColor blackColor];
|
return [UIColor blackColor];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)quotedSnippet
|
|
||||||
{
|
|
||||||
if (self.displayableQuotedText.displayText.length > 0) {
|
|
||||||
return self.displayableQuotedText.displayText;
|
|
||||||
} else {
|
|
||||||
NSString *mimeType = self.quotedMessage.contentType;
|
|
||||||
|
|
||||||
if (mimeType.length > 0) {
|
|
||||||
return [TSAttachment emojiForMimeType:mimeType];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return @"";
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
- (UIFont *)quotedAuthorFont
|
- (UIFont *)quotedAuthorFont
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue