From a0912106ca13e77965f06d9a08030c4481d22f8a Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 27 Jul 2020 04:22:34 -0400 Subject: [PATCH] EventDelegate: fix not setting fetchProfilesFuture --- src/gui/Pages/Chat/Timeline/EventDelegate.qml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/Pages/Chat/Timeline/EventDelegate.qml b/src/gui/Pages/Chat/Timeline/EventDelegate.qml index 37d07006..363e134b 100644 --- a/src/gui/Pages/Chat/Timeline/EventDelegate.qml +++ b/src/gui/Pages/Chat/Timeline/EventDelegate.qml @@ -82,9 +82,13 @@ HColumnLayout { // HSelectableLabel's MouseArea hover events onCursorShapeChanged: eventList.cursorShape = cursorShape - Component.onCompleted: if (model.fetch_profile) py.callClientCoro( - chat.userId, "get_event_profiles", [chat.roomId, model.id], - ) + Component.onCompleted: if (model.fetch_profile) + fetchProfilesFuture = py.callClientCoro( + chat.userId, + "get_event_profiles", + [chat.roomId, model.id], + () => { fetchProfilesFuture = null } + ) Component.onDestruction: if (fetchProfilesFuture) fetchProfilesFuture.cancel()