mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Get rid of some useless code
This commit is contained in:
parent
b7d6191e24
commit
750c64f323
8 changed files with 8 additions and 12 deletions
|
@ -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 {
|
||||
|
|
|
@ -12,7 +12,7 @@ Item {
|
|||
required property string filesize
|
||||
|
||||
height: row.height + 24
|
||||
width: parent ? parent.width : undefined
|
||||
width: parent.width
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -409,7 +409,7 @@ Item {
|
|||
roleValue: MtxEvent.Member
|
||||
|
||||
ColumnLayout {
|
||||
width: parent ? parent.width : undefined
|
||||
width: parent.width
|
||||
|
||||
NoticeMessage {
|
||||
body: formatted
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue