diff options
Diffstat (limited to 'qml')
-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: { |