Introduce group call tiles

This commit is contained in:
ismailgulek
2021-03-17 19:39:41 +03:00
parent 547019fcc6
commit ce82815186
7 changed files with 357 additions and 10 deletions
@@ -147,6 +147,22 @@ static NSAttributedString *timestampVerticalWhitespace = nil;
// Show timestamps always on right
self.displayTimestampForSelectedComponentOnLeftWhenPossible = NO;
}
case MXEventTypeCustom:
{
if ([event.type isEqualToString:kWidgetMatrixEventTypeString]
|| [event.type isEqualToString:kWidgetModularEventTypeString])
{
Widget *widget = [[Widget alloc] initWithWidgetEvent:event inMatrixSession:roomDataSource.mxSession];
if ([widget.type isEqualToString:kWidgetTypeJitsiV1] ||
[widget.type isEqualToString:kWidgetTypeJitsiV2])
{
self.tag = RoomBubbleCellDataTagGroupCall;
// Show timestamps always on right
self.displayTimestampForSelectedComponentOnLeftWhenPossible = NO;
}
}
}
break;
default:
@@ -160,8 +176,6 @@ static NSAttributedString *timestampVerticalWhitespace = nil;
// Reset attributedTextMessage to force reset MXKRoomCellData parameters
self.attributedTextMessage = nil;
self.displayTimestampForSelectedComponentOnLeftWhenPossible = YES;
}
return self;
@@ -750,9 +764,15 @@ static NSAttributedString *timestampVerticalWhitespace = nil;
case RoomBubbleCellDataTagCall:
shouldAddEvent = NO;
break;
case RoomBubbleCellDataTagGroupCall:
shouldAddEvent = NO;
break;
case RoomBubbleCellDataTagRoomCreateConfiguration:
shouldAddEvent = NO;
break;
case RoomBubbleCellDataTagRoomCreationIntro:
shouldAddEvent = NO;
break;
default:
break;
}
@@ -800,6 +820,20 @@ static NSAttributedString *timestampVerticalWhitespace = nil;
case MXEventTypeCallReject:
shouldAddEvent = NO;
break;
case MXEventTypeCustom:
{
if ([event.type isEqualToString:kWidgetMatrixEventTypeString]
|| [event.type isEqualToString:kWidgetModularEventTypeString])
{
Widget *widget = [[Widget alloc] initWithWidgetEvent:event inMatrixSession:roomDataSource.mxSession];
if ([widget.type isEqualToString:kWidgetTypeJitsiV1] ||
[widget.type isEqualToString:kWidgetTypeJitsiV2])
{
shouldAddEvent = NO;
}
}
break;
}
default:
break;
}