Skip to content

Commit

Permalink
Make quoting work again
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Marbach <johannesm@element.io>
  • Loading branch information
Johennes committed Jun 21, 2022
1 parent a8514ed commit fbdd11f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Riot/Modules/Room/RoomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -3687,9 +3687,10 @@ - (void)showAdditionalActionsMenuForEvent:(MXEvent*)selectedEvent inCell:(id<MXK
MXStrongifyAndReturnIfNil(self);

[self cancelEventSelection];

// Quote the message a la Markdown into the input toolbar composer
self.inputToolbarView.textMessage = [NSString stringWithFormat:@"%@\n>%@\n\n", self.inputToolbarView.textMessage, selectedComponent.textMessage];
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];
Expand Down
5 changes: 1 addition & 4 deletions Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@ -(void)customizeViewRendering

- (void)setTextMessage:(NSString *)textMessage
{
if (!textMessage)
{
[self setAttributedTextMessage:nil];
}
[self setAttributedTextMessage:textMessage ? [[NSAttributedString alloc] initWithString:textMessage] : nil];
}

- (void)setAttributedTextMessage:(NSAttributedString *)attributedTextMessage
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-6328.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make quoting context menu action work again

0 comments on commit fbdd11f

Please sign in to comment.