Merge pull request #6447 from vector-im/steve/6423_lls_reply

Location sharing: Handle live location sharing start event reply in the timeline (PSG-4)
This commit is contained in:
SBiOSoftWhare 2022-07-18 18:16:50 +02:00 committed by GitHub
commit 1d6a61c0e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 5 deletions

View file

@ -2520,7 +2520,7 @@ To enable access, tap Settings> Location and select Always";
"message_reply_to_sender_sent_a_voice_message" = "sent a voice message.";
"message_reply_to_sender_sent_a_file" = "sent a file.";
"message_reply_to_sender_sent_their_location" = "has shared their location.";
"message_reply_to_sender_sent_their_live_location" = "has shared their live location.";
"message_reply_to_sender_sent_their_live_location" = "Live location.";
"message_reply_to_message_to_reply_to_prefix" = "In reply to";
// Room members

View file

@ -3415,7 +3415,7 @@ public class VectorL10n: NSObject {
public static var messageReplyToSenderSentAnImage: String {
return VectorL10n.tr("Vector", "message_reply_to_sender_sent_an_image")
}
/// has shared their live location.
/// Live location.
public static var messageReplyToSenderSentTheirLiveLocation: String {
return VectorL10n.tr("Vector", "message_reply_to_sender_sent_their_live_location")
}

View file

@ -3683,7 +3683,8 @@ static CGSize kThreadListBarButtonItemImageSize;
}]];
}
if (!isJitsiCallEvent && selectedEvent.eventType != MXEventTypePollStart)
if (!isJitsiCallEvent && selectedEvent.eventType != MXEventTypePollStart &&
selectedEvent.eventType != MXEventTypeBeaconInfo)
{
[self.eventMenuBuilder addItemWithType:EventMenuItemTypeQuote
action:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionQuote]
@ -3719,7 +3720,8 @@ static CGSize kThreadListBarButtonItemImageSize;
}]];
}
if (!isJitsiCallEvent && BuildSettings.messageDetailsAllowShare && selectedEvent.eventType != MXEventTypePollStart)
if (!isJitsiCallEvent && BuildSettings.messageDetailsAllowShare && selectedEvent.eventType != MXEventTypePollStart &&
selectedEvent.eventType != MXEventTypeBeaconInfo)
{
[self.eventMenuBuilder addItemWithType:EventMenuItemTypeShare
action:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionShare]
@ -6769,7 +6771,7 @@ static CGSize kThreadListBarButtonItemImageSize;
MXKRoomBubbleTableViewCell *roomBubbleTableViewCell = (MXKRoomBubbleTableViewCell *)cell;
MXKAttachment *attachment = roomBubbleTableViewCell.bubbleData.attachment;
BOOL result = (event.eventType != MXEventTypePollStart && (!attachment || attachment.type != MXKAttachmentTypeSticker));
BOOL result = !attachment || attachment.type != MXKAttachmentTypeSticker;
if (attachment && !BuildSettings.messageDetailsAllowCopyMedia)
{
@ -6795,6 +6797,8 @@ static CGSize kThreadListBarButtonItemImageSize;
case MXEventTypeKeyVerificationMac:
case MXEventTypeKeyVerificationDone:
case MXEventTypeKeyVerificationCancel:
case MXEventTypePollStart:
case MXEventTypeBeaconInfo:
result = NO;
break;
case MXEventTypeCustom:

View file

@ -130,6 +130,17 @@ class LocationPlainCell: SizableBaseRoomCell, RoomCellReactionsDisplayable, Room
super.prepareForReuse()
self.event = nil
}
override func onLongPressGesture(_ longPressGestureRecognizer: UILongPressGestureRecognizer!) {
var userInfo: [String: Any]?
if let event = self.event {
userInfo = [kMXKRoomBubbleCellEventKey: event]
}
delegate.cell(self, didRecognizeAction: kMXKRoomBubbleCellLongPressOnEvent, userInfo: userInfo)
}
}
extension LocationPlainCell: RoomTimelineLocationViewDelegate {

1
changelog.d/6423.change Normal file
View file

@ -0,0 +1 @@
Location sharing: Handle live location sharing start event reply in the timeline.