From 5eb7970d33ab0fab70f7fbb70f61bd1911d19b98 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 28 Aug 2021 21:36:42 +0000 Subject: Create event emitter only after creating an account Otherwise event emitter will be closed immediately --- qml/main.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qml/main.qml b/qml/main.qml index e095f58..4969a45 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -57,8 +57,6 @@ Kirigami.ApplicationWindow { Component.onCompleted: { console.log('starting') - eventEmitter = dcAccounts.getEventEmitter() - eventEmitter.start(); // Create an account if there is none. if (dcAccounts.getSelectedAccount() == null) { @@ -66,6 +64,9 @@ Kirigami.ApplicationWindow { dcAccounts.addAccount(); } + eventEmitter = dcAccounts.getEventEmitter() + eventEmitter.start(); + // Open selected account if there is one. let selectedAccount = dcAccounts.getSelectedAccount(); if (selectedAccount) { -- cgit v1.2.3-70-g09d2