mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 02:22:44 +02:00
[Voice Broadcast] Aggregate the chunks of voice messages in room timeline (#6891)
This commit is contained in:
@@ -2320,7 +2320,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
[self showCameraControllerAnimated:YES];
|
||||
}]];
|
||||
}
|
||||
if (BuildSettings.voiceBroadcastEnabled && !self.isNewDirectChat)
|
||||
if (RiotSettings.shared.enableVoiceBroadcast && !self.isNewDirectChat)
|
||||
{
|
||||
[actionItems addObject:[[RoomActionItem alloc] initWithImage:AssetImages.actionLive.image andAction:^{
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
@@ -2332,7 +2332,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
MXSession* session = self.roomDataSource.mxSession;
|
||||
[session getOrCreateVoiceBroadcastServiceFor:self.roomDataSource.room completion:^(VoiceBroadcastService *voiceBroadcastService) {
|
||||
if (voiceBroadcastService) {
|
||||
if ([[voiceBroadcastService getState] isEqualToString:@"stopped"]) {
|
||||
if ([VoiceBroadcastInfo isStoppedFor:[voiceBroadcastService getState]]) {
|
||||
[session.voiceBroadcastService startVoiceBroadcastWithSuccess:^(NSString * _Nullable success) {
|
||||
|
||||
} failure:^(NSError * _Nonnull error) {
|
||||
@@ -3211,6 +3211,39 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (bubbleData.tag == RoomBubbleCellDataTagVoiceBroadcast)
|
||||
{
|
||||
if (bubbleData.isIncoming)
|
||||
{
|
||||
if (bubbleData.isPaginationFirstBubble)
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierIncomingVoiceBroadcastWithPaginationTitle;
|
||||
}
|
||||
else if (bubbleData.shouldHideSenderInformation)
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierIncomingVoiceBroadcastWithoutSenderInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierIncomingVoiceBroadcast;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bubbleData.isPaginationFirstBubble)
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierOutgoingVoiceBroadcastWithPaginationTitle;
|
||||
}
|
||||
else if (bubbleData.shouldHideSenderInformation)
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierOutgoingVoiceBroadcastWithoutSenderInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierOutgoingVoiceBroadcast;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (roomBubbleCellData.getFirstBubbleComponentWithDisplay.event.isEmote)
|
||||
{
|
||||
if (bubbleData.isIncoming)
|
||||
|
||||
Reference in New Issue
Block a user