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

@@ -111,6 +111,17 @@ public:
*/
QString getAuthorDisplayName(bool isPending = false) const;
/**
* @brief Get the display name of the event author but with any newlines removed.
*
* Turns out you can put newlines in your display name so we need to handle that
* primarily for the room list subtitle.
*
* @param isPending whether the event is pending as this cannot be derived from
* just the event object.
*/
QString singleLineAuthorDisplayname(bool isPending = false) const;
/**
* @brief Return a QDateTime object for the event timestamp.
*/