From 97f6acbb0db7ba9bf527be04d506f0d24a8b1c2c Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 30 Oct 2020 09:14:40 -0400 Subject: [PATCH] =?UTF-8?q?Security.qml:=20loginFuture=20=E2=86=92=20login?= =?UTF-8?q?FutureId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gui/Pages/AccountSettings/Security.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/Pages/AccountSettings/Security.qml b/src/gui/Pages/AccountSettings/Security.qml index 281e01ac..09d4a204 100644 --- a/src/gui/Pages/AccountSettings/Security.qml +++ b/src/gui/Pages/AccountSettings/Security.qml @@ -17,7 +17,7 @@ HColumnPage { property bool enableFlickShortcuts: SwipeView ? SwipeView.isCurrentItem : true - property Future loadFuture: null + property string loadFutureId: "" readonly property QtObject account: ModelStore.get("accounts").find(userId) readonly property bool offline: ! account || account.presence === "offline" @@ -27,14 +27,14 @@ HColumnPage { } function loadDevices() { - loadFuture = py.callClientCoro(userId, "devices_info", [], devices => { + loadFutureId = py.callClientCoro(userId, "devices_info", [], devs => { deviceList.uncheckAll() deviceList.model.clear() - for (const device of devices) + for (const device of devs) deviceList.model.append(device) - loadFuture = null + loadFutureId = "" deviceList.sectionItemCounts = getSectionItemCounts() }) } @@ -212,7 +212,7 @@ HColumnPage { GroupButton { id: refreshButton text: qsTr("Refresh") - loading: page.loadFuture !== null + loading: page.loadFutureId !== "" icon.name: "device-refresh-list" onClicked: page.loadDevices() }