Skip to content

Commit

Permalink
Merge pull request #7713 from vector-im/nicolasm/PSB-427_remove-quote…
Browse files Browse the repository at this point in the history
…-menu-action

Fix: Remove the “Quote” action from the menu of the selected message.
  • Loading branch information
nimau authored Nov 22, 2023
2 parents d088e98 + b2e25fa commit 611b604
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
1 change: 0 additions & 1 deletion Riot/Modules/Room/EventMenu/EventMenuItemType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ enum EventMenuItemType: Int {
case cancelSending
case cancelDownloading
case saveMedia
case quote
case forward
case permalink
case share
Expand Down
20 changes: 0 additions & 20 deletions Riot/Modules/Room/RoomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -4056,26 +4056,6 @@ - (void)showAdditionalActionsMenuForEvent:(MXEvent*)selectedEvent inCell:(id<MXK
[self cancelEventSelection];
}]];
}

if (!isJitsiCallEvent && !selectedEvent.isTimelinePollEvent &&
selectedEvent.eventType != MXEventTypeBeaconInfo)
{
[self.eventMenuBuilder addItemWithType:EventMenuItemTypeQuote
action:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionQuote]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);

[self cancelEventSelection];

// Quote the message a la Markdown into the input toolbar composer
NSString *prefix = [self.inputToolbarView.textMessage length] ? [NSString stringWithFormat:@"%@\n", self.inputToolbarView.textMessage] : @"";
self.inputToolbarView.textMessage = [NSString stringWithFormat:@"%@>%@\n\n", prefix, selectedComponent.textMessage];

// And display the keyboard
[self.inputToolbarView becomeFirstResponder];
}]];
}

if (selectedEvent.sentState == MXEventSentStateSent &&
!selectedEvent.isTimelinePollEvent &&
Expand Down
1 change: 1 addition & 0 deletions changelog.d/7691.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The "Quote" action has been removed from the menu of the selected message.

0 comments on commit 611b604

Please sign in to comment.