Merge branch 'develop' into ismail/5068_start_thread

This commit is contained in:
ismailgulek
2022-01-17 11:35:10 +03:00
300 changed files with 6253 additions and 924 deletions
@@ -174,8 +174,17 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
self.displayTimestampForSelectedComponentOnLeftWhenPossible = NO;
}
}
}
break;
}
case MXEventTypeRoomMessage:
{
if (event.location) {
self.tag = RoomBubbleCellDataTagLocation;
self.collapsable = NO;
self.collapsed = NO;
}
}
default:
break;
}
@@ -273,6 +282,11 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
return NO;
}
if (self.tag == RoomBubbleCellDataTagLocation)
{
return NO;
}
return [super hasNoDisplay];
}
@@ -885,6 +899,9 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
case RoomBubbleCellDataTagPoll:
shouldAddEvent = NO;
break;
case RoomBubbleCellDataTagLocation:
shouldAddEvent = NO;
break;
default:
break;
}
@@ -897,7 +914,12 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
{
case MXEventTypeRoomMessage:
{
NSString *messageType = event.content[@"msgtype"];
if (event.location) {
shouldAddEvent = NO;
break;
}
NSString *messageType = event.content[kMXMessageTypeKey];
if ([messageType isEqualToString:kMXMessageTypeKeyVerificationRequest])
{
@@ -1031,7 +1053,7 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
break;
case MXEventTypeRoomMessage:
{
NSString *msgType = event.content[@"msgtype"];
NSString *msgType = event.content[kMXMessageTypeKey];
if ([msgType isEqualToString:kMXMessageTypeKeyVerificationRequest])
{
@@ -1084,7 +1106,7 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
{
NSString *mediaName = [self accessibilityLabelForAttachmentType:self.attachment.type];
MXJSONModelSetString(accessibilityLabel, self.events.firstObject.content[@"body"]);
MXJSONModelSetString(accessibilityLabel, self.events.firstObject.content[kMXMessageBodyKey]);
if (accessibilityLabel)
{
accessibilityLabel = [NSString stringWithFormat:@"%@ %@", mediaName, accessibilityLabel];
@@ -1115,9 +1137,6 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
case MXKAttachmentTypeVideo:
accessibilityLabel = [VectorL10n mediaTypeAccessibilityVideo];
break;
case MXKAttachmentTypeLocation:
accessibilityLabel = [VectorL10n mediaTypeAccessibilityLocation];
break;
case MXKAttachmentTypeFile:
accessibilityLabel = [VectorL10n mediaTypeAccessibilityFile];
break;