Handle multiple line names

Add function to get the display name for an author on a single line as nothing stops there being linebreaks.

BUG:476731
This commit is contained in:
James Graham
2023-11-12 18:46:04 +00:00
parent 2a3e1dfcd7
commit 61ad892732
5 changed files with 82 additions and 1 deletions

View File

@@ -355,7 +355,7 @@ QString NeoChatRoom::lastEventToString(Qt::TextFormat format, bool stripNewlines
body = eventHandler.getPlainBody(stripNewlines);
}
return safeMemberName(event->senderId()) + (event->isStateEvent() ? QLatin1String(" ") : QLatin1String(": ")) + body;
return eventHandler.singleLineAuthorDisplayname() + (event->isStateEvent() ? QLatin1String(" ") : QLatin1String(": ")) + body;
}
return {};
}