summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--resources/qml/delegates/Encrypted.qml4
-rw-r--r--resources/qml/delegates/FileMessage.qml2
-rw-r--r--resources/qml/delegates/ImageMessage.qml2
-rw-r--r--resources/qml/delegates/MessageDelegate.qml2
-rw-r--r--resources/qml/delegates/Placeholder.qml2
-rw-r--r--resources/qml/delegates/PlayableMediaMessage.qml2
-rw-r--r--resources/qml/delegates/TextMessage.qml2
-rw-r--r--src/timeline/EventStore.cpp4
8 files changed, 8 insertions, 12 deletions
diff --git a/resources/qml/delegates/Encrypted.qml b/resources/qml/delegates/Encrypted.qml

index 076b5a5e..8c9257a4 100644 --- a/resources/qml/delegates/Encrypted.qml +++ b/resources/qml/delegates/Encrypted.qml
@@ -15,7 +15,7 @@ Rectangle { required property string eventId radius: fontMetrics.lineSpacing / 2 + Nheko.paddingMedium - width: parent ? parent.width : undefined + width: parent.width height: contents.implicitHeight + Nheko.paddingMedium * 2 color: Nheko.colors.alternateBase @@ -57,7 +57,7 @@ Rectangle { } } color: Nheko.colors.text - width: parent ? parent.width : undefined + width: parent.width } Button { diff --git a/resources/qml/delegates/FileMessage.qml b/resources/qml/delegates/FileMessage.qml
index daee0d8b..dded7594 100644 --- a/resources/qml/delegates/FileMessage.qml +++ b/resources/qml/delegates/FileMessage.qml
@@ -12,7 +12,7 @@ Item { required property string filesize height: row.height + 24 - width: parent ? parent.width : undefined + width: parent.width RowLayout { id: row diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml
index b8522a74..2cc86d5a 100644 --- a/resources/qml/delegates/ImageMessage.qml +++ b/resources/qml/delegates/ImageMessage.qml
@@ -16,7 +16,7 @@ Item { required property string filename required property bool isReply required property string eventId - property double tempWidth: Math.min(parent ? parent.width : undefined, originalWidth < 1 ? 200 : originalWidth) + property double tempWidth: Math.min(parent.width, originalWidth < 1 ? 200 : originalWidth) property double tempHeight: tempWidth * proportionalHeight property double divisor: isReply ? 5 : 3 property bool tooHigh: tempHeight > timelineView.height / divisor diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml
index a9c61ef3..af6c7192 100644 --- a/resources/qml/delegates/MessageDelegate.qml +++ b/resources/qml/delegates/MessageDelegate.qml
@@ -409,7 +409,7 @@ Item { roleValue: MtxEvent.Member ColumnLayout { - width: parent ? parent.width : undefined + width: parent.width NoticeMessage { body: formatted diff --git a/resources/qml/delegates/Placeholder.qml b/resources/qml/delegates/Placeholder.qml
index 692fe4a9..6ed260cd 100644 --- a/resources/qml/delegates/Placeholder.qml +++ b/resources/qml/delegates/Placeholder.qml
@@ -9,6 +9,6 @@ MatrixText { required property string typeString text: qsTr("unimplemented event: ") + typeString - width: parent ? parent.width : undefined + width: parent.width color: Nheko.inactiveColors.text } diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml
index 36c038ee..955bf1be 100644 --- a/resources/qml/delegates/PlayableMediaMessage.qml +++ b/resources/qml/delegates/PlayableMediaMessage.qml
@@ -21,7 +21,7 @@ Item { required property string url required property string body required property string filesize - property double tempWidth: Math.min(parent ? parent.width : undefined, originalWidth < 1 ? 400 : originalWidth) + property double tempWidth: Math.min(parent.width, originalWidth < 1 ? 400 : originalWidth) property double tempHeight: tempWidth * proportionalHeight property double divisor: isReply ? 4 : 2 property bool tooHigh: tempHeight > timelineRoot.height / divisor diff --git a/resources/qml/delegates/TextMessage.qml b/resources/qml/delegates/TextMessage.qml
index 11ad3aeb..82f136cb 100644 --- a/resources/qml/delegates/TextMessage.qml +++ b/resources/qml/delegates/TextMessage.qml
@@ -32,7 +32,7 @@ MatrixText { blockquote { margin-left: 1em; } </style> " + formatted.replace("<pre>", "<pre style='white-space: pre-wrap; background-color: " + Nheko.colors.alternateBase + "'>").replace("<del>", "<s>").replace("</del>", "</s>").replace("<strike>", "<s>").replace("</strike>", "</s>") - width: parent ? parent.width : undefined + width: parent.width height: isReply ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : undefined clip: isReply selectByMouse: !Settings.mobileMode && !isReply diff --git a/src/timeline/EventStore.cpp b/src/timeline/EventStore.cpp
index 2e439320..c98e62de 100644 --- a/src/timeline/EventStore.cpp +++ b/src/timeline/EventStore.cpp
@@ -543,10 +543,6 @@ EventStore::reactions(const std::string &event_id) reaction.users_ += QString::fromStdString(user); } - nhlog::db()->debug("key: {}, count: {}, users: {}", - reaction.key_.toStdString(), - reaction.count_, - reaction.users_.toStdString()); temp.append(QVariant::fromValue(reaction)); }