This commit is contained in:
ismailgulek
2021-02-03 14:01:29 +03:00
parent 7a231fead7
commit 0593e18d07
26 changed files with 983 additions and 29 deletions
+24
View File
@@ -123,6 +123,8 @@
#import "Riot-Swift.h"
NSString *const kRoomCallTileTapped = @"RoomCallTileTapped";
@interface RoomViewController () <UISearchBarDelegate, UIGestureRecognizerDelegate, UIScrollViewAccessibilityDelegate, RoomTitleViewTapGestureDelegate, RoomParticipantsViewControllerDelegate, MXKRoomMemberDetailsViewControllerDelegate, ContactsTableViewControllerDelegate, MXServerNoticesDelegate, RoomContextualMenuViewControllerDelegate,
ReactionsMenuViewModelCoordinatorDelegate, EditHistoryCoordinatorBridgePresenterDelegate, MXKDocumentPickerPresenterDelegate, EmojiPickerCoordinatorBridgePresenterDelegate,
ReactionHistoryCoordinatorBridgePresenterDelegate, CameraPresenterDelegate, MediaPickerCoordinatorBridgePresenterDelegate,
@@ -363,6 +365,9 @@
[self.bubblesTableView registerClass:RoomCreationCollapsedBubbleCell.class forCellReuseIdentifier:RoomCreationCollapsedBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomCreationWithPaginationCollapsedBubbleCell.class forCellReuseIdentifier:RoomCreationWithPaginationCollapsedBubbleCell.defaultReuseIdentifier];
// call cells
[self.bubblesTableView registerClass:RoomDirectCallStatusBubbleCell.class forCellReuseIdentifier:RoomDirectCallStatusBubbleCell.defaultReuseIdentifier];
[self vc_removeBackTitle];
// Replace the default input toolbar view.
@@ -2025,6 +2030,10 @@
{
cellViewClass = bubbleData.isPaginationFirstBubble ? RoomCreationWithPaginationCollapsedBubbleCell.class : RoomCreationCollapsedBubbleCell.class;
}
else if (bubbleData.tag == RoomBubbleCellDataTagCall)
{
cellViewClass = RoomDirectCallStatusBubbleCell.class;
}
else if (bubbleData.isIncoming)
{
if (bubbleData.isAttachmentWithThumbnail)
@@ -2195,6 +2204,14 @@
}
}
}
else if (bubbleData.tag == RoomBubbleCellDataTagCall)
{
if ([bubbleData isKindOfClass:[RoomBubbleCellData class]])
{
// post notification `RoomCallTileTapped`
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomCallTileTapped object:bubbleData];
}
}
else
{
// Show contextual menu on single tap if bubble is not collapsed
@@ -2327,6 +2344,13 @@
[self showReactionHistoryForEventId:tappedEventId animated:YES];
}
}
else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellCallBackButtonPressed])
{
MXEvent *callInviteEvent = userInfo[kMXKRoomBubbleCellEventKey];
MXCallInviteEventContent *eventContent = [MXCallInviteEventContent modelFromJSON:callInviteEvent.content];
[self roomInputToolbarView:self.inputToolbarView placeCallWithVideo2:eventContent.isVideoCall];
}
else
{
// Keep default implementation for other actions