aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-07-18 01:23:09 +0300
committerlink2xt <link2xt@testrun.org>2021-07-18 01:23:09 +0300
commit9e5fe2dc856795d0d3d8b6a3adf3fdd3015d9158 (patch)
treec1b0de2738e81fae40b0f19ccabcab298d8718b9
parent3e8465c3b8e7c96faf0c0fe214f4dc43e3e6ac3e (diff)
downloadkdeltachat-9e5fe2dc856795d0d3d8b6a3adf3fdd3015d9158.tar.gz
kdeltachat-9e5fe2dc856795d0d3d8b6a3adf3fdd3015d9158.zip
Remove all layers when pressing "Switch account"
Otherwise clicking "Switch account" multiple times results in multiple layers stacked.
-rw-r--r--qml/main.qml7
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)
+ }
}
]
}