mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 11:30:50 +02:00
Add voice broadcast state event (#6785)
This commit is contained in:
@@ -182,6 +182,13 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
// Show timestamps always on right
|
||||
self.displayTimestampForSelectedComponentOnLeftWhenPossible = NO;
|
||||
}
|
||||
} else if ([event.type isEqualToString:VoiceBroadcastSettings.eventType]) {
|
||||
self.tag = RoomBubbleCellDataTagVoiceBroadcast;
|
||||
self.collapsable = NO;
|
||||
self.collapsed = NO;
|
||||
|
||||
MXLogDebug(@"VB incoming initWithEvent")
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -271,42 +278,44 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
|
||||
- (BOOL)hasNoDisplay
|
||||
{
|
||||
if (self.tag == RoomBubbleCellDataTagKeyVerificationNoDisplay)
|
||||
BOOL hasNoDisplay = YES;
|
||||
|
||||
switch (self.tag)
|
||||
{
|
||||
return YES;
|
||||
case RoomBubbleCellDataTagKeyVerificationNoDisplay:
|
||||
hasNoDisplay = YES;
|
||||
break;
|
||||
case RoomBubbleCellDataTagRoomCreationIntro:
|
||||
hasNoDisplay = NO;
|
||||
break;
|
||||
case RoomBubbleCellDataTagPoll:
|
||||
if (self.events.lastObject.isEditEvent) {
|
||||
hasNoDisplay = YES;
|
||||
}
|
||||
|
||||
hasNoDisplay = NO;
|
||||
break;
|
||||
case RoomBubbleCellDataTagLocation:
|
||||
hasNoDisplay = NO;
|
||||
break;
|
||||
case RoomBubbleCellDataTagLiveLocation:
|
||||
// If the summary does not exist don't show the cell
|
||||
if (!self.beaconInfoSummary)
|
||||
{
|
||||
hasNoDisplay = YES;
|
||||
}
|
||||
|
||||
hasNoDisplay = NO;
|
||||
break;
|
||||
case RoomBubbleCellDataTagVoiceBroadcast:
|
||||
hasNoDisplay = YES;
|
||||
break;
|
||||
default:
|
||||
hasNoDisplay = [super hasNoDisplay];
|
||||
break;
|
||||
}
|
||||
|
||||
if (self.tag == RoomBubbleCellDataTagRoomCreationIntro)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (self.tag == RoomBubbleCellDataTagPoll)
|
||||
{
|
||||
if (self.events.lastObject.isEditEvent) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (self.tag == RoomBubbleCellDataTagLocation)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (self.tag == RoomBubbleCellDataTagLiveLocation)
|
||||
{
|
||||
// If the summary does not exist don't show the cell
|
||||
if (!self.beaconInfoSummary)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
return [super hasNoDisplay];
|
||||
return hasNoDisplay;
|
||||
}
|
||||
|
||||
- (BOOL)hasThreadRoot
|
||||
@@ -1050,6 +1059,9 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
case RoomBubbleCellDataTagLiveLocation:
|
||||
shouldAddEvent = NO;
|
||||
break;
|
||||
case RoomBubbleCellDataTagVoiceBroadcast:
|
||||
shouldAddEvent = NO;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1118,6 +1130,8 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
{
|
||||
shouldAddEvent = NO;
|
||||
}
|
||||
} else if ([event.type isEqualToString:VoiceBroadcastSettings.eventType]) {
|
||||
shouldAddEvent = NO;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user