mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 08:03:50 +02:00
Merge branch 'develop' into ismail/5096_thread_notifications
This commit is contained in:
@@ -27,7 +27,7 @@ extern NSString * const kMXKAttachmentErrorDomain;
|
||||
/**
|
||||
List attachment types
|
||||
*/
|
||||
typedef enum : NSUInteger {
|
||||
typedef NS_ENUM(NSUInteger, MXKAttachmentType) {
|
||||
MXKAttachmentTypeUndefined,
|
||||
MXKAttachmentTypeImage,
|
||||
MXKAttachmentTypeAudio,
|
||||
@@ -35,8 +35,7 @@ typedef enum : NSUInteger {
|
||||
MXKAttachmentTypeVideo,
|
||||
MXKAttachmentTypeFile,
|
||||
MXKAttachmentTypeSticker
|
||||
|
||||
} MXKAttachmentType;
|
||||
};
|
||||
|
||||
/**
|
||||
`MXKAttachment` represents a room attachment.
|
||||
|
||||
@@ -744,6 +744,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
|
||||
|
||||
@@ -147,6 +147,11 @@
|
||||
*/
|
||||
@property (nonatomic) BOOL isAttachmentWithIcon;
|
||||
|
||||
/**
|
||||
YES when the bubble correspond to an attachment (audio, file...).
|
||||
*/
|
||||
@property (nonatomic, readonly) BOOL isAttachment;
|
||||
|
||||
/**
|
||||
Flag that indicates that self.attributedTextMessage will be not nil.
|
||||
This avoids the computation of self.attributedTextMessage that can take time.
|
||||
|
||||
Reference in New Issue
Block a user