mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
RoomVC: Add location sharing cell actions.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user