diff options
author | link2xt <link2xt@testrun.org> | 2021-05-30 00:00:00 +0300 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-05-30 00:00:00 +0300 |
commit | 318ae67c17f3e64532bad23c2a61a93446db553d (patch) | |
tree | 75e07fd8a75a797aa814b9670f4ce7ae887030a2 | |
parent | 8d571c5a5d32aae4803c3199586b824a5860cd13 (diff) | |
download | kdeltachat-318ae67c17f3e64532bad23c2a61a93446db553d.tar.gz kdeltachat-318ae67c17f3e64532bad23c2a61a93446db553d.zip |
Open selected account when application is started
-rw-r--r-- | qml/main.qml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qml/main.qml b/qml/main.qml index c689196..a6cc6f1 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -54,6 +54,16 @@ Kirigami.ApplicationWindow { console.log('starting') eventEmitter = dcAccounts.getEventEmitter() eventEmitter.start(); + + // Open selected account if there is one. + let selectedAccount = dcAccounts.getSelectedAccount(); + if (selectedAccount) { + if (selectedAccount.isConfigured()) { + pageStack.replace("qrc:/qml/ChatlistPage.qml", {context: selectedAccount, eventEmitter: eventEmitter}) + } else { + pageStack.replace("qrc:/qml/ConfigurePage.qml", {context: selectedAccount, eventEmitter: eventEmitter}) + } + } } onClosing: { |