aboutsummaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-05-30 00:00:00 +0300
committerlink2xt <link2xt@testrun.org>2021-05-30 00:00:00 +0300
commit318ae67c17f3e64532bad23c2a61a93446db553d (patch)
tree75e07fd8a75a797aa814b9670f4ce7ae887030a2 /qml
parent8d571c5a5d32aae4803c3199586b824a5860cd13 (diff)
downloadkdeltachat-318ae67c17f3e64532bad23c2a61a93446db553d.tar.gz
kdeltachat-318ae67c17f3e64532bad23c2a61a93446db553d.zip
Open selected account when application is started
Diffstat (limited to 'qml')
-rw-r--r--qml/main.qml10
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: {