From f2857243cb68d7ba69cea75a98fabb43227f456c Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 4 Jul 2022 17:43:00 +0200 Subject: [PATCH] show 'press again to quit' message when pressing back on last page in the stack --- electrum/gui/qml/components/main.qml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index b820e4f4a..a2d048e3b 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -205,11 +205,23 @@ ApplicationWindow stack.pop() } else { // destroy most GUI components so that we don't dump so many null reference warnings on exit - app.header.visible = false - mainStackView.clear() + if (closeMsgTimer.running) { + app.header.visible = false + mainStackView.clear() + } else { + notificationPopup.show('Press Back again to exit') + closeMsgTimer.start() + close.accepted = false + } } } + Timer { + id: closeMsgTimer + interval: 5000 + repeat: false + } + Connections { target: Daemon function onWalletRequiresPassword() {