add support for reactions on VB (#7179)

This commit is contained in:
Nicolas Mauri
2023-01-06 12:14:08 +01:00
parent 0033e0e724
commit 315bed3fe6
3 changed files with 10 additions and 2 deletions
@@ -634,9 +634,11 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
{
__block NSInteger firstVisibleComponentIndex = NSNotFound;
BOOL isPoll = (self.events.firstObject.eventType == MXEventTypePollStart);
MXEvent *firstEvent = self.events.firstObject;
BOOL isPoll = (firstEvent.eventType == MXEventTypePollStart);
BOOL isVoiceBroadcast = (firstEvent.eventType == MXEventTypeCustom && [firstEvent.type isEqualToString: VoiceBroadcastSettings.voiceBroadcastInfoContentKeyType]);
if ((isPoll || self.attachment) && self.bubbleComponents.count)
if ((isPoll || self.attachment || isVoiceBroadcast) && self.bubbleComponents.count)
{
firstVisibleComponentIndex = 0;
}