MXKRoomBubbleCellData: Add convenient isAttachment property.

This commit is contained in:
SBiOSoftWhare
2022-01-31 10:40:45 +01:00
parent cd987cd10e
commit e73fedfef5
2 changed files with 26 additions and 0 deletions
@@ -724,6 +724,27 @@
return NO;
}
- (BOOL)isAttachment
{
if (!self.attachment)
{
return NO;
}
if (!attachment.contentURL || !attachment.contentInfo) {
return NO;
}
switch (self.attachment.type) {
case MXKAttachmentTypeFile:
case MXKAttachmentTypeAudio:
case MXKAttachmentTypeVoiceMessage:
return YES;
default:
return NO;
}
}
- (void)setMaxTextViewWidth:(CGFloat)inMaxTextViewWidth
{
// Check change