Cleanup code

This commit is contained in:
Alfonso Grillo
2022-12-29 17:38:09 +01:00
parent 4bc37ba146
commit 8596b36257
8 changed files with 20 additions and 11 deletions
@@ -636,7 +636,7 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
__block NSInteger firstVisibleComponentIndex = NSNotFound;
MXEvent *firstEvent = self.events.firstObject;
BOOL isPoll = (self.events.firstObject.eventType == MXEventTypePollStart || self.events.firstObject.eventType == MXEventTypePollEnd);
BOOL isPoll = firstEvent.isTimelinePollEvent;
BOOL isVoiceBroadcast = (firstEvent.eventType == MXEventTypeCustom && [firstEvent.type isEqualToString: VoiceBroadcastSettings.voiceBroadcastInfoContentKeyType]);
if ((isPoll || self.attachment || isVoiceBroadcast) && self.bubbleComponents.count)