From 4647fda04f08b5cf3ce82a7891a2e26bfd53b982 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Thu, 30 Mar 2023 15:16:23 +0200 Subject: [PATCH] qml: show invoices/requests lists through long press I think we can re-enable the requests list, because requests are now created explicitly by pressing the create request button. Since this is an advanced feature, it should not be in the way of people who do not want to see it. Here is a solution that might work. --- electrum/gui/qml/components/SendDialog.qml | 12 ------------ electrum/gui/qml/components/WalletMainView.qml | 7 ++++++- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/electrum/gui/qml/components/SendDialog.qml b/electrum/gui/qml/components/SendDialog.qml index 75001f99b..3615a3e11 100644 --- a/electrum/gui/qml/components/SendDialog.qml +++ b/electrum/gui/qml/components/SendDialog.qml @@ -48,18 +48,6 @@ ElDialog { ButtonContainer { Layout.fillWidth: true - FlatButton { - Layout.fillWidth: true - Layout.preferredWidth: 1 - icon.source: '../../icons/tab_receive.png' - text: qsTr('Saved Invoices') - enabled: Daemon.currentWallet.invoiceModel.rowCount() // TODO: only count non-expired - onClicked: { - dialog.close() - app.stack.push(Qt.resolvedUrl('Invoices.qml')) - } - } - FlatButton { Layout.fillWidth: true Layout.preferredWidth: 1 diff --git a/electrum/gui/qml/components/WalletMainView.qml b/electrum/gui/qml/components/WalletMainView.qml index a6c12bf65..f31b7a692 100644 --- a/electrum/gui/qml/components/WalletMainView.qml +++ b/electrum/gui/qml/components/WalletMainView.qml @@ -188,8 +188,10 @@ Item { var dialog = receiveDetailsDialog.createObject(mainView) dialog.open() } + onPressAndHold: { + app.stack.push(Qt.resolvedUrl('ReceiveRequests.qml')) + } } - FlatButton { visible: Daemon.currentWallet Layout.fillWidth: true @@ -197,6 +199,9 @@ Item { icon.source: '../../icons/tab_send.png' text: qsTr('Send') onClicked: openSendDialog() + onPressAndHold: { + app.stack.push(Qt.resolvedUrl('Invoices.qml')) + } } } }