RoomVC: Add location sharing cell actions.

This commit is contained in:
SBiOSoftWhare
2022-05-03 15:58:56 +02:00
parent 4733df9768
commit 2be03415ae
4 changed files with 30 additions and 24 deletions
+24 -4
View File
@@ -3156,6 +3156,26 @@ static CGSize kThreadListBarButtonItemImageSize;
[self mention:roomMember];
}
}
else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellStopShareButtonPressed])
{
NSString *beaconInfoEventId;
if ([bubbleData isKindOfClass:[RoomBubbleCellData class]])
{
RoomBubbleCellData *roomBubbleCellData = (RoomBubbleCellData*)bubbleData;
beaconInfoEventId = roomBubbleCellData.beaconInfoSummary.id;
}
[self.delegate roomViewControllerDidStopLiveLocationSharing:self beaconInfoEventId:beaconInfoEventId];
}
else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellRetryShareButtonPressed])
{
MXEvent *selectedEvent = userInfo[kMXKRoomBubbleCellEventKey];
if (selectedEvent)
{
// TODO: - Implement retry live location action
}
}
else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellTapOnMessageTextView] || [actionIdentifier isEqualToString:kMXKRoomBubbleCellTapOnContentView])
{
// Retrieve the tapped event
@@ -3166,6 +3186,10 @@ static CGSize kThreadListBarButtonItemImageSize;
{
[self cancelEventSelection];
}
else if (bubbleData.tag == RoomBubbleCellDataTagLiveLocation)
{
[self.delegate roomViewController:self didRequestLiveLocationPresentationForBubbleData:bubbleData];
}
else if (tappedEvent)
{
if (tappedEvent.eventType == MXEventTypeRoomCreate)
@@ -3215,10 +3239,6 @@ static CGSize kThreadListBarButtonItemImageSize;
[self selectEventWithId:tappedEvent.eventId];
}
}
else if (bubbleData.tag == RoomBubbleCellDataTagLiveLocation)
{
[self.delegate roomViewController:self didRequestLiveLocationPresentationForEvent:tappedEvent bubbleData:bubbleData];
}
else
{
// Show contextual menu on single tap if bubble is not collapsed