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
|
// Handle here user actions on bubbles for Vector app
|
||||||
if (customizedRoomDataSource)
|
if (customizedRoomDataSource)
|
||||||
{
|
{
|
||||||
|
id<MXKRoomBubbleCellDataStoring> bubbleData;
|
||||||
|
|
||||||
|
if ([cell isKindOfClass:[MXKRoomBubbleTableViewCell class]])
|
||||||
|
{
|
||||||
|
MXKRoomBubbleTableViewCell *roomBubbleTableViewCell = (MXKRoomBubbleTableViewCell*)cell;
|
||||||
|
bubbleData = roomBubbleTableViewCell.bubbleData;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellTapOnAvatarView])
|
if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellTapOnAvatarView])
|
||||||
{
|
{
|
||||||
selectedRoomMember = [self.roomDataSource.roomState.members memberWithUserId:userInfo[kMXKRoomBubbleCellUserIdKey]];
|
selectedRoomMember = [self.roomDataSource.roomState.members memberWithUserId:userInfo[kMXKRoomBubbleCellUserIdKey]];
|
||||||
|
@ -2056,8 +2065,15 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Highlight this event in displayed message
|
// Show contextual menu on single tap if bubble is not collapsed
|
||||||
[self selectEventWithId:tappedEvent.eventId];
|
if (bubbleData.collapsed)
|
||||||
|
{
|
||||||
|
[self selectEventWithId:tappedEvent.eventId];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self showContextualMenuForEvent:tappedEvent cell:cell animated:YES];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2132,7 +2148,11 @@
|
||||||
else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellLongPressOnEvent])
|
else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellLongPressOnEvent])
|
||||||
{
|
{
|
||||||
MXEvent *tappedEvent = userInfo[kMXKRoomBubbleCellEventKey];
|
MXEvent *tappedEvent = userInfo[kMXKRoomBubbleCellEventKey];
|
||||||
[self handleLongPressFromCell:cell withTappedEvent:tappedEvent];
|
|
||||||
|
if (!bubbleData.collapsed)
|
||||||
|
{
|
||||||
|
[self handleLongPressFromCell:cell withTappedEvent:tappedEvent];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue