summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-07-28 20:05:47 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-08-25 19:03:15 +0200
commit718a58d388abd228c6a08f9fa3365588c06923ba (patch)
treedab9877a7bd16fd291fcd16262d868cf87469c67 /resources
parentPort redacted messages (diff)
downloadnheko-718a58d388abd228c6a08f9fa3365588c06923ba.tar.xz
Get rid of redundant constructions and make room implicit
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/MessageView.qml4
-rw-r--r--resources/qml/delegates/Redacted.qml9
2 files changed, 7 insertions, 6 deletions
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml
index 41d996c1..417a4f5a 100644
--- a/resources/qml/MessageView.qml
+++ b/resources/qml/MessageView.qml
@@ -65,7 +65,7 @@ Item {
             width: chat.delegateMaxWidth
             height: Math.max((section.item?.height ?? 0) + gridContainer.implicitHeight, 10)
             anchors.horizontalCenter: ListView.view.contentItem.horizontalCenter
-            room: chatRoot.roommodel
+            //room: chatRoot.roommodel
 
             required property var day
             required property bool isSender
@@ -203,7 +203,7 @@ Item {
 
                     color: type == MtxEvent.NoticeMessage ? palette.buttonText : palette.text
                     font.italic: type == MtxEvent.NoticeMessage
-                    formatted: formattedBody
+                    formatted: formattedBody + "a"
 
                     Layout.fillWidth: true
                     //Layout.maximumWidth: implicitWidth
diff --git a/resources/qml/delegates/Redacted.qml b/resources/qml/delegates/Redacted.qml
index a09e4c3f..1bb3209f 100644
--- a/resources/qml/delegates/Redacted.qml
+++ b/resources/qml/delegates/Redacted.qml
@@ -2,10 +2,10 @@
 //
 // SPDX-License-Identifier: GPL-3.0-or-later
 
-import QtQuick 2.15
-import QtQuick.Controls 2.15
-import QtQuick.Layouts 1.15
-import im.nheko 1.0
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import im.nheko
 
 Control {
     id: msgRoot
@@ -14,6 +14,7 @@ Control {
     property bool fitsMetadata: false //parent.width - redactedLayout.width > metadataWidth + 4
 
     required property string eventId
+    required property Room room
 
     contentItem: RowLayout {
         id: redactedLayout