edit is displayed in the WYSIWYG, but the send button still sends a new message instead of correcting the edit

This commit is contained in:
Mauro Romito
2022-10-07 18:35:13 +02:00
parent c0f58a3938
commit ea73b2c2ff
4 changed files with 28 additions and 4 deletions
+10 -1
View File
@@ -4630,7 +4630,11 @@ static CGSize kThreadListBarButtonItemImageSize;
{
MXEvent *event = [self.roomDataSource eventWithEventId:eventId];
if ([self inputToolbarConformsToToolbarViewProtocol])
if ([self inputToolbarConformsToHtmlToolbarViewProtocol]) {
self.textMessageBeforeEditing = self.inputToolbarView.attributedTextMessage;
[self.inputToolbarView setHtmlWithContent: [self.customizedRoomDataSource editableHtmlTextMessageFor:event]];
}
else if ([self inputToolbarConformsToToolbarViewProtocol])
{
self.textMessageBeforeEditing = self.inputToolbarView.attributedTextMessage;
self.inputToolbarView.attributedTextMessage = [self.customizedRoomDataSource editableAttributedTextMessageFor:event];
@@ -4650,6 +4654,11 @@ static CGSize kThreadListBarButtonItemImageSize;
self.textMessageBeforeEditing = nil;
}
- (BOOL)inputToolbarConformsToHtmlToolbarViewProtocol
{
return [self.inputToolbarView conformsToProtocol:@protocol(HtmlRoomInputToolbarViewProtocol)];
}
- (BOOL)inputToolbarConformsToToolbarViewProtocol
{
return [self.inputToolbarView conformsToProtocol:@protocol(RoomInputToolbarViewProtocol)];