From f785e4d5b0e77f3e28fdfc5891bb6f9b0e562649 Mon Sep 17 00:00:00 2001 From: James Graham Date: Wed, 15 Feb 2023 19:30:23 +0000 Subject: [PATCH] Inline Edit Loader Put the edit component in a loader to that it doesn't use resources when not in use. CCBUG: 465715 --- src/qml/Component/Timeline/MessageDelegate.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qml/Component/Timeline/MessageDelegate.qml b/src/qml/Component/Timeline/MessageDelegate.qml index bd6e22dd0..d69f9b40b 100644 --- a/src/qml/Component/Timeline/MessageDelegate.qml +++ b/src/qml/Component/Timeline/MessageDelegate.qml @@ -24,10 +24,13 @@ TimelineContainer { visible: currentRoom.chatBoxEditId !== model.eventId isEmote: messageDelegate.isEmote } - MessageEditComponent { + Loader { Layout.fillWidth: true - messageId: model.eventId visible: currentRoom.chatBoxEditId === model.eventId + active: visible + sourceComponent: MessageEditComponent { + messageId: model.eventId + } } LinkPreviewDelegate { Layout.fillWidth: true