From f186e56121bd078b9bd1ebd49fd57c28fd3ec64f Mon Sep 17 00:00:00 2001 From: LcsTen Date: Thu, 9 Mar 2023 19:11:43 +0100 Subject: [PATCH] Show an appropriate hint if the room is inaccessible --- resources/qml/TimelineView.qml | 2 +- src/timeline/RoomlistModel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 70347009..c06b47c2 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -252,7 +252,7 @@ Item { Layout.rightMargin: Nheko.paddingLarge TextArea { - text: TimelineManager.escapeEmoji(preview.roomTopic) + text: preview.roomName != "" ? TimelineManager.escapeEmoji(preview.roomTopic) : qsTr("This room is possibly inaccessible. If this room is private, you should remove it from the child list of this space.") wrapMode: TextEdit.WordWrap textFormat: TextEdit.RichText readOnly: true diff --git a/src/timeline/RoomlistModel.cpp b/src/timeline/RoomlistModel.cpp index cb23a12d..17226977 100644 --- a/src/timeline/RoomlistModel.cpp +++ b/src/timeline/RoomlistModel.cpp @@ -222,7 +222,7 @@ RoomlistModel::data(const QModelIndex &index, int role) const case Roles::RoomName: return tr("No preview available"); case Roles::LastMessage: - return QString(); + return tr("This room is possibly inaccessible"); case Roles::Time: return QString(); case Roles::Timestamp: