diff options
author | link2xt <link2xt@testrun.org> | 2021-07-18 01:23:09 +0300 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-07-18 01:23:09 +0300 |
commit | 9e5fe2dc856795d0d3d8b6a3adf3fdd3015d9158 (patch) | |
tree | c1b0de2738e81fae40b0f19ccabcab298d8718b9 /qml | |
parent | 3e8465c3b8e7c96faf0c0fe214f4dc43e3e6ac3e (diff) | |
download | kdeltachat-9e5fe2dc856795d0d3d8b6a3adf3fdd3015d9158.tar.gz kdeltachat-9e5fe2dc856795d0d3d8b6a3adf3fdd3015d9158.zip |
Remove all layers when pressing "Switch account"
Otherwise clicking "Switch account" multiple times results in multiple layers stacked.
Diffstat (limited to 'qml')
-rw-r--r-- | qml/main.qml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qml/main.qml b/qml/main.qml index cd1af50..7a91980 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -37,7 +37,12 @@ Kirigami.ApplicationWindow { Kirigami.Action { text: "Switch account" iconName: "system-switch-user" - onTriggered: pageStack.layers.push(accountsPage) + onTriggered: { + while (pageStack.layers.depth > 1) { + pageStack.layers.pop() + } + pageStack.layers.push(accountsPage) + } } ] } |