MESSENGER-4029 remove longpress and context menus for state events

This commit is contained in:
Frank Rotermund
2023-01-30 10:35:09 +00:00
committed by JanNiklas Grabowski
parent 90ba8689c2
commit d2a0493b23
+6 -3
View File
@@ -2179,7 +2179,8 @@ static CGSize kThreadListBarButtonItemImageSize;
- (void)handleLongPressFromCell:(id<MXKCellRendering>)cell withTappedEvent:(MXEvent*)event
{
if (event && !self.customizedRoomDataSource.selectedEventId)
// bwi: disable context menu for state events
if (event && !self.customizedRoomDataSource.selectedEventId && !event.isState)
{
[self showContextualMenuForEvent:event fromSingleTapGesture:NO cell:cell animated:YES];
}
@@ -3628,7 +3629,7 @@ static CGSize kThreadListBarButtonItemImageSize;
}
else
{
// Show contextual menu on single tap if bubble is not collapsed
// bwi: Show contextual menu on single tap if bubble is not collapsed and if its not a state event
if (bubbleData.collapsed)
{
[self selectEventWithId:tappedEvent.eventId];
@@ -3638,7 +3639,9 @@ static CGSize kThreadListBarButtonItemImageSize;
if (tappedEvent.location) {
[_delegate roomViewController:self didRequestLocationPresentationForEvent:tappedEvent bubbleData:bubbleData];
} else {
[self showContextualMenuForEvent:tappedEvent fromSingleTapGesture:YES cell:cell animated:YES];
if (!tappedEvent.isState) {
[self showContextualMenuForEvent:tappedEvent fromSingleTapGesture:YES cell:cell animated:YES];
}
}
}
}