Get rid of some useless code

This commit is contained in:
Nicolas Werner 2021-12-30 19:32:28 +01:00
parent b7d6191e24
commit 750c64f323
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
8 changed files with 8 additions and 12 deletions

View File

@ -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 {

View File

@ -12,7 +12,7 @@ Item {
required property string filesize
height: row.height + 24
width: parent ? parent.width : undefined
width: parent.width
RowLayout {
id: row

View File

@ -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

View File

@ -409,7 +409,7 @@ Item {
roleValue: MtxEvent.Member
ColumnLayout {
width: parent ? parent.width : undefined
width: parent.width
NoticeMessage {
body: formatted

View File

@ -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
}

View File

@ -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

View File

@ -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

View File

@ -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));
}