Fix event redaction and remove junk code

This commit is contained in:
vSLG
2020-03-29 19:06:13 -03:00
committed by miruka
parent db1afc980e
commit fc878e7537
6 changed files with 38 additions and 96 deletions

View File

@@ -1,5 +1,3 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
import QtQuick.Layouts 1.12
import Clipboard 0.1
@@ -33,7 +31,7 @@ HColumnLayout {
readonly property bool smallAvatar: compact
readonly property bool collapseAvatar: combine
readonly property bool hideAvatar: onRight
readonly property bool isRedacted: model.event_type === "RedactionEvent"
readonly property bool isRedacted: model.event_type === "RedactedEvent"
readonly property bool hideNameLine:
model.event_type === "RoomMessageEmote" ||
@@ -229,7 +227,9 @@ HColumnLayout {
properties: ({
userId: chat.userId,
roomId: chat.roomId,
eventIds: [model.event_id]
eventIds: eventList.selectedCount ?
eventList.getSortedChecked().map(ev => ev.event_id) :
[model.event_id]
})
}

View File

@@ -200,7 +200,7 @@ QtObject {
return qsTr(ev.content).arg(sender).arg(target)
}
if (type === "RedactionEvent") {
if (type === "RedactedEvent") {
return qsTr(
"<i>Removed message" +
`${ev.reason ? ". Reason: " + ev.reason : ""}` +