mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 10:32:46 +02:00
[Voice Broadcast] Aggregate the chunks of voice messages in room timeline (#6891)
This commit is contained in:
@@ -182,7 +182,9 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
// Show timestamps always on right
|
||||
self.displayTimestampForSelectedComponentOnLeftWhenPossible = NO;
|
||||
}
|
||||
} else if ([event.type isEqualToString:VoiceBroadcastSettings.eventType]) {
|
||||
}
|
||||
else if ([event.type isEqualToString:VoiceBroadcastSettings.eventType])
|
||||
{
|
||||
self.tag = RoomBubbleCellDataTagVoiceBroadcast;
|
||||
self.collapsable = NO;
|
||||
self.collapsed = NO;
|
||||
@@ -195,11 +197,18 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
}
|
||||
case MXEventTypeRoomMessage:
|
||||
{
|
||||
if (event.location) {
|
||||
if (event.location)
|
||||
{
|
||||
self.tag = RoomBubbleCellDataTagLocation;
|
||||
self.collapsable = NO;
|
||||
self.collapsed = NO;
|
||||
}
|
||||
else if (event.content[VoiceBroadcastSettings.voiceBroadcastContentKeyChunkType])
|
||||
{
|
||||
self.tag = RoomBubbleCellDataTagVoiceBroadcast;
|
||||
self.collapsable = NO;
|
||||
self.collapsed = NO;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -307,7 +316,12 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
|
||||
break;
|
||||
case RoomBubbleCellDataTagVoiceBroadcast:
|
||||
hasNoDisplay = YES;
|
||||
if (RiotSettings.shared.enableVoiceBroadcast == YES &&
|
||||
[VoiceBroadcastInfo isStartedFor:[VoiceBroadcastInfo modelFromJSON:self.events.lastObject.content].state])
|
||||
{
|
||||
hasNoDisplay = NO;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
hasNoDisplay = [super hasNoDisplay];
|
||||
|
||||
Reference in New Issue
Block a user