diff --git a/Riot/Generated/MatrixKitStrings.swift b/Riot/Generated/MatrixKitStrings.swift index e5c1e7f31..b178f6d8d 100644 --- a/Riot/Generated/MatrixKitStrings.swift +++ b/Riot/Generated/MatrixKitStrings.swift @@ -695,6 +695,10 @@ public class MatrixKitL10n: NSObject { public static var messageReplyToSenderSentAnImage: String { return MatrixKitL10n.tr("message_reply_to_sender_sent_an_image") } + /// has shared their location. + public static var messageReplyToSenderSentTheirLocation: String { + return MatrixKitL10n.tr("message_reply_to_sender_sent_their_location") + } /// There are unsaved changes. Leaving will discard them. public static var messageUnsavedChanges: String { return MatrixKitL10n.tr("message_unsaved_changes") diff --git a/Riot/Modules/MatrixKit/Assets/MatrixKitAssets.bundle/en.lproj/MatrixKit.strings b/Riot/Modules/MatrixKit/Assets/MatrixKitAssets.bundle/en.lproj/MatrixKit.strings index f9e40406a..b7937f194 100644 --- a/Riot/Modules/MatrixKit/Assets/MatrixKitAssets.bundle/en.lproj/MatrixKit.strings +++ b/Riot/Modules/MatrixKit/Assets/MatrixKitAssets.bundle/en.lproj/MatrixKit.strings @@ -258,6 +258,7 @@ "message_reply_to_sender_sent_an_audio_file" = "sent an audio file."; "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_message_to_reply_to_prefix" = "In reply to"; // Room members diff --git a/Riot/Modules/MatrixKit/Models/Room/MXKSendReplyEventStringLocalizer.m b/Riot/Modules/MatrixKit/Models/Room/MXKSendReplyEventStringLocalizer.m index f116c466b..b592db0d6 100644 --- a/Riot/Modules/MatrixKit/Models/Room/MXKSendReplyEventStringLocalizer.m +++ b/Riot/Modules/MatrixKit/Models/Room/MXKSendReplyEventStringLocalizer.m @@ -45,6 +45,11 @@ return [MatrixKitL10n messageReplyToSenderSentAFile]; } +- (NSString *)senderSentTheirLocation +{ + return [MatrixKitL10n messageReplyToSenderSentTheirLocation]; +} + - (NSString *)messageToReplyToPrefix { return [MatrixKitL10n messageReplyToMessageToReplyToPrefix]; diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 586e16248..925dfc86a 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -3277,7 +3277,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; } - if (selectedEvent.sentState == MXEventSentStateSent && selectedEvent.eventType != MXEventTypePollStart) + if (selectedEvent.sentState == MXEventSentStateSent && + selectedEvent.eventType != MXEventTypePollStart && + !selectedEvent.hasLocation) { [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionForward] style:UIAlertActionStyleDefault