Fix reactions layout

This commit is contained in:
Alfonso Grillo
2022-12-29 17:17:57 +01:00
parent c18f3a1be5
commit 64f904f8dd
2 changed files with 5 additions and 1 deletions
@@ -2885,6 +2885,10 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
return YES;
}
if (event.eventType == MXEventTypePollEnd) {
return YES;
}
// Specific case for voice broadcast event
if (event.eventType == MXEventTypeCustom &&
[event.type isEqualToString:VoiceBroadcastSettings.voiceBroadcastInfoContentKeyType]) {
@@ -636,7 +636,7 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
__block NSInteger firstVisibleComponentIndex = NSNotFound;
MXEvent *firstEvent = self.events.firstObject;
BOOL isPoll = (firstEvent.eventType == MXEventTypePollStart);
BOOL isPoll = (self.events.firstObject.eventType == MXEventTypePollStart || self.events.firstObject.eventType == MXEventTypePollEnd);
BOOL isVoiceBroadcast = (firstEvent.eventType == MXEventTypeCustom && [firstEvent.type isEqualToString: VoiceBroadcastSettings.voiceBroadcastInfoContentKeyType]);
if ((isPoll || self.attachment || isVoiceBroadcast) && self.bubbleComponents.count)