Fix fonts and edition on replies

This commit is contained in:
aringenbach
2022-05-04 12:17:21 +02:00
parent 4cdf8b31cd
commit 8077b8058d
10 changed files with 45 additions and 19 deletions
@@ -1750,11 +1750,17 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
}
- (NSAttributedString*)renderHTMLString:(NSString*)htmlString forEvent:(MXEvent*)event withRoomState:(MXRoomState*)roomState
{
return [self renderHTMLString:htmlString forEvent:event withRoomState:roomState isEditMode:NO];
}
- (NSAttributedString*)renderHTMLString:(NSString*)htmlString forEvent:(MXEvent*)event withRoomState:(MXRoomState*)roomState isEditMode:(BOOL)isEditMode
{
NSString *html = htmlString;
// Special treatment for "In reply to" message
if (event.isReplyEvent || (!RiotSettings.shared.enableThreads && event.isInThread))
// Note: `isEditMode` fixes an issue where editing a reply would display an "In reply to" span instead of a mention.
if (!isEditMode && (event.isReplyEvent || (!RiotSettings.shared.enableThreads && event.isInThread)))
{
html = [self renderReplyTo:html withRoomState:roomState];
}