mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Rendering location messages in the timeline.
This commit is contained in:
committed by
Stefan Ceriu
parent
f2dea3f2ec
commit
c1a3fede8f
@@ -174,8 +174,17 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
self.displayTimestampForSelectedComponentOnLeftWhenPossible = NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case MXEventTypeRoomMessage:
|
||||
{
|
||||
if (event.hasLocation) {
|
||||
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];
|
||||
}
|
||||
|
||||
@@ -845,6 +859,9 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
case RoomBubbleCellDataTagPoll:
|
||||
shouldAddEvent = NO;
|
||||
break;
|
||||
case RoomBubbleCellDataTagLocation:
|
||||
shouldAddEvent = NO;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -857,6 +874,11 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
{
|
||||
case MXEventTypeRoomMessage:
|
||||
{
|
||||
if (event.hasLocation) {
|
||||
shouldAddEvent = NO;
|
||||
break;
|
||||
}
|
||||
|
||||
NSString *messageType = event.content[@"msgtype"];
|
||||
|
||||
if ([messageType isEqualToString:kMXMessageTypeKeyVerificationRequest])
|
||||
@@ -1075,9 +1097,6 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
case MXKAttachmentTypeVideo:
|
||||
accessibilityLabel = [VectorL10n mediaTypeAccessibilityVideo];
|
||||
break;
|
||||
case MXKAttachmentTypeLocation:
|
||||
accessibilityLabel = [VectorL10n mediaTypeAccessibilityLocation];
|
||||
break;
|
||||
case MXKAttachmentTypeFile:
|
||||
accessibilityLabel = [VectorL10n mediaTypeAccessibilityFile];
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user