diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-07-12 01:28:09 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-07-12 01:28:09 +0200 |
commit | f704e381c34641d6f52f1a3e6dfb6af853d7aa9f (patch) | |
tree | 5996bbecd4da2a1cd65c4a172c9b7af0b822b952 /resources | |
parent | Fix off-by-1 in insertRows when loading room list from initial sync (diff) | |
download | nheko-f704e381c34641d6f52f1a3e6dfb6af853d7aa9f.tar.xz |
Fix a few missing properties
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/MessageView.qml | 6 | ||||
-rw-r--r-- | resources/qml/TimelineRow.qml | 9 | ||||
-rw-r--r-- | resources/qml/delegates/MessageDelegate.qml | 11 | ||||
-rw-r--r-- | resources/qml/delegates/Reply.qml | 6 |
4 files changed, 28 insertions, 4 deletions
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml index 9e01ef9a..33dff122 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml @@ -329,6 +329,9 @@ ScrollView { required property bool isEdited required property string replyTo required property string userId + required property string roomTopic + required property string roomName + required property string callType required property var reactions required property int trustlevel required property var timestamp @@ -432,6 +435,9 @@ ScrollView { replyTo: wrapper.replyTo userId: wrapper.userId userName: wrapper.userName + roomTopic: wrapper.roomTopic + roomName: wrapper.roomName + callType: wrapper.callType reactions: wrapper.reactions trustlevel: wrapper.trustlevel timestamp: wrapper.timestamp diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml index c1cdaf9b..53453e99 100644 --- a/resources/qml/TimelineRow.qml +++ b/resources/qml/TimelineRow.qml @@ -33,6 +33,9 @@ Item { required property string replyTo required property string userId required property string userName + required property string roomTopic + required property string roomName + required property string callType required property var reactions required property int trustlevel required property var timestamp @@ -101,6 +104,9 @@ Item { userId: row.replyData.userId ?? "" userName: row.replyData.userName ?? "" thumbnailUrl: row.replyData.thumbnailUrl ?? "" + roomTopic: row.replyData.roomTopic ?? "" + roomName: row.replyData.roomName ?? "" + callType: row.replyData.callType ?? "" } // actual message content @@ -123,6 +129,9 @@ Item { isOnlyEmoji: r.isOnlyEmoji userId: r.userId userName: r.userName + roomTopic: r.roomTopic + roomName: r.roomName + callType: r.callType isReply: false } diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml index 4b32751c..0b060629 100644 --- a/resources/qml/delegates/MessageDelegate.qml +++ b/resources/qml/delegates/MessageDelegate.qml @@ -26,6 +26,9 @@ Item { required property bool isOnlyEmoji required property string userId required property string userName + required property string roomTopic + required property string roomName + required property string callType height: chooser.childrenRect.height @@ -192,7 +195,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply - formatted: model.data.roomName ? qsTr("room name changed to: %1").arg(model.data.roomName) : qsTr("removed room name") + formatted: d.roomName ? qsTr("room name changed to: %1").arg(d.roomName) : qsTr("removed room name") } } @@ -204,7 +207,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply - formatted: model.data.roomTopic ? qsTr("topic changed to: %1").arg(model.data.roomTopic) : qsTr("removed topic") + formatted: d.roomTopic ? qsTr("topic changed to: %1").arg(d.roomTopic) : qsTr("removed topic") } } @@ -228,7 +231,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply - formatted: qsTr("%1 created and configured room: %2").arg(d.userName).arg(model.data.roomId) + formatted: qsTr("%1 created and configured room: %2").arg(d.userName).arg(room.roomId()) } } @@ -241,7 +244,7 @@ Item { isOnlyEmoji: false isReply: d.isReply formatted: { - switch (model.data.callType) { + switch (d.callType) { case "voice": return qsTr("%1 placed a voice call.").arg(d.userName); case "video": diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml index 08f13955..3a188d78 100644 --- a/resources/qml/delegates/Reply.qml +++ b/resources/qml/delegates/Reply.qml @@ -27,6 +27,9 @@ Item { property string userId property string userName property string thumbnailUrl + property string roomTopic + property string roomName + property string callType width: parent.width height: replyContainer.height @@ -89,6 +92,9 @@ Item { isOnlyEmoji: r.isOnlyEmoji userId: r.userId userName: r.userName + roomTopic: r.roomTopic + roomName: r.roomName + callType: r.callType enabled: false width: parent.width isReply: true |