Force RoomListDelegate to use plaintext

Text.AutoText isn't robust enough to handle this
This commit is contained in:
Tobias Fella
2022-03-08 14:44:52 +01:00
parent c59e3db1dd
commit 62f6cfbf9a
2 changed files with 2 additions and 1 deletions

View File

@@ -236,6 +236,7 @@ Kirigami.ScrollablePage {
Keys.onReturnPressed: enterRoomAction.trigger()
bold: unreadCount > 0
label: name ?? ""
labelItem.textFormat: Text.PlainText
subtitle: {
const txt = (lastEvent.length === 0 ? topic : lastEvent).replace(/(\r\n\t|\n|\r\t)/gm, " ")
if (txt.length) {

View File

@@ -329,7 +329,7 @@ QVariant RoomListModel::data(const QModelIndex &index, int role) const
}
NeoChatRoom *room = m_rooms.at(index.row());
if (role == NameRole) {
return !room->name().isEmpty() ? room->htmlSafeName() : room->htmlSafeDisplayName();
return !room->name().isEmpty() ? room->name() : room->displayName();
}
if (role == DisplayNameRole) {
return room->displayName();