summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--resources/qml/InviteDialog.qml4
-rw-r--r--resources/qml/Root.qml2
-rw-r--r--src/timeline/TimelineModel.cpp3
-rw-r--r--src/timeline/TimelineModel.h2
4 files changed, 8 insertions, 3 deletions
diff --git a/resources/qml/InviteDialog.qml b/resources/qml/InviteDialog.qml
index 026e3297..e9ff475d 100644
--- a/resources/qml/InviteDialog.qml
+++ b/resources/qml/InviteDialog.qml
@@ -11,7 +11,7 @@ ApplicationWindow {
     id: inviteDialogRoot
 
     property string roomId
-    property string roomName
+    property string plainRoomName
     property InviteesModel invitees
 
     function addInvite() {
@@ -29,7 +29,7 @@ ApplicationWindow {
         close();
     }
 
-    title: qsTr("Invite users to ") + roomName
+    title: qsTr("Invite users to ") + plainRoomName
     x: MainWindow.x + (MainWindow.width / 2) - (width / 2)
     y: MainWindow.y + (MainWindow.height / 2) - (height / 2)
     height: 380
diff --git a/resources/qml/Root.qml b/resources/qml/Root.qml
index b5395232..f71c18e2 100644
--- a/resources/qml/Root.qml
+++ b/resources/qml/Root.qml
@@ -150,7 +150,7 @@ Page {
         onOpenInviteUsersDialog: {
             var dialog = inviteDialog.createObject(timelineRoot, {
                 "roomId": Rooms.currentRoom.roomId,
-                "roomName": Rooms.currentRoom.roomName,
+                "plainRoomName": Rooms.currentRoom.plainRoomName,
                 "invitees": invitees
             });
             dialog.show();
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 7ce0e98a..e431e1ac 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -327,6 +327,9 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj
                 this->isSpace_ = create->content.type == mtx::events::state::room_type::space;
         this->isEncrypted_ = cache::isRoomEncrypted(room_id_.toStdString());
 
+        // this connection will simplify adding the plainRoomNameChanged() signal everywhere that it needs to be
+        connect(this, &TimelineModel::roomNameChanged, this, &TimelineModel::plainRoomNameChanged);
+
         connect(
           this,
           &TimelineModel::redactionFailed,
diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h
index ebf24bec..0d1eb1f9 100644
--- a/src/timeline/TimelineModel.h
+++ b/src/timeline/TimelineModel.h
@@ -162,6 +162,7 @@ class TimelineModel : public QAbstractListModel
           bool paginationInProgress READ paginationInProgress NOTIFY paginationInProgressChanged)
         Q_PROPERTY(QString roomId READ roomId CONSTANT)
         Q_PROPERTY(QString roomName READ roomName NOTIFY roomNameChanged)
+        Q_PROPERTY(QString plainRoomName READ plainRoomName NOTIFY plainRoomNameChanged)
         Q_PROPERTY(QString roomAvatarUrl READ roomAvatarUrl NOTIFY roomAvatarUrlChanged)
         Q_PROPERTY(QString roomTopic READ roomTopic NOTIFY roomTopicChanged)
         Q_PROPERTY(int roomMemberCount READ roomMemberCount NOTIFY roomMemberCountChanged)
@@ -367,6 +368,7 @@ signals:
 
         void encryptionChanged();
         void roomNameChanged();
+        void plainRoomNameChanged();
         void roomTopicChanged();
         void roomAvatarUrlChanged();
         void roomMemberCountChanged();