From 6586403985f5a9046307d24144fe8b94ecd6686a Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 4 Nov 2019 14:45:20 -0400 Subject: [PATCH] Event/RoomDelegate: consider RoomEncrypted- events --- src/qml/Chat/Timeline/EventDelegate.qml | 8 ++++++-- src/qml/SidePane/RoomDelegate.qml | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/qml/Chat/Timeline/EventDelegate.qml b/src/qml/Chat/Timeline/EventDelegate.qml index 20cd7569..02733ceb 100644 --- a/src/qml/Chat/Timeline/EventDelegate.qml +++ b/src/qml/Chat/Timeline/EventDelegate.qml @@ -37,14 +37,18 @@ Column { readonly property bool smallAvatar: eventList.canCombine(model, nextItem) && (model.event_type === "RoomMessageEmote" || - ! model.event_type.startsWith("RoomMessage")) + ! (model.event_type.startsWith("RoomMessage") || + model.event_type.startsWith("RoomEncrypted"))) readonly property bool collapseAvatar: combine readonly property bool hideAvatar: onRight readonly property bool hideNameLine: model.event_type === "RoomMessageEmote" || - ! model.event_type.startsWith("RoomMessage") || + ! ( + model.event_type.startsWith("RoomMessage") || + model.event_type.startsWith("RoomEncrypted") + ) || onRight || combine diff --git a/src/qml/SidePane/RoomDelegate.qml b/src/qml/SidePane/RoomDelegate.qml index addd8ee0..953c079c 100644 --- a/src/qml/SidePane/RoomDelegate.qml +++ b/src/qml/SidePane/RoomDelegate.qml @@ -73,7 +73,8 @@ HTileDelegate { // If it's an emote or non-message/media event if (ev.event_type === "RoomMessageEmote" || - ! ev.event_type.startsWith("RoomMessage")) { + (! ev.event_type.startsWith("RoomMessage") && + ! ev.event_type.startsWith("RoomEncrypted"))) { return Utils.processedEventText(ev) }