mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 15:52:40 +00:00
RoomVC: Show contextual menu on single tap.
This commit is contained in:
parent
4bde8a435b
commit
6ce4a826be
1 changed files with 23 additions and 3 deletions
|
@ -2013,6 +2013,15 @@
|
|||
// Handle here user actions on bubbles for Vector app
|
||||
if (customizedRoomDataSource)
|
||||
{
|
||||
id<MXKRoomBubbleCellDataStoring> bubbleData;
|
||||
|
||||
if ([cell isKindOfClass:[MXKRoomBubbleTableViewCell class]])
|
||||
{
|
||||
MXKRoomBubbleTableViewCell *roomBubbleTableViewCell = (MXKRoomBubbleTableViewCell*)cell;
|
||||
bubbleData = roomBubbleTableViewCell.bubbleData;
|
||||
}
|
||||
|
||||
|
||||
if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellTapOnAvatarView])
|
||||
{
|
||||
selectedRoomMember = [self.roomDataSource.roomState.members memberWithUserId:userInfo[kMXKRoomBubbleCellUserIdKey]];
|
||||
|
@ -2056,8 +2065,15 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
// Highlight this event in displayed message
|
||||
[self selectEventWithId:tappedEvent.eventId];
|
||||
// Show contextual menu on single tap if bubble is not collapsed
|
||||
if (bubbleData.collapsed)
|
||||
{
|
||||
[self selectEventWithId:tappedEvent.eventId];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self showContextualMenuForEvent:tappedEvent cell:cell animated:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2132,7 +2148,11 @@
|
|||
else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellLongPressOnEvent])
|
||||
{
|
||||
MXEvent *tappedEvent = userInfo[kMXKRoomBubbleCellEventKey];
|
||||
[self handleLongPressFromCell:cell withTappedEvent:tappedEvent];
|
||||
|
||||
if (!bubbleData.collapsed)
|
||||
{
|
||||
[self handleLongPressFromCell:cell withTappedEvent:tappedEvent];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue