fix(@desktop/wallet): browser tab, can't click send button

fixes #4351
This commit is contained in:
Khushboo Mehta 2022-01-04 11:38:17 +01:00 committed by Khushboo-dev-cpp
parent cdd79a87e7
commit 619d0e56ac
3 changed files with 9 additions and 3 deletions

View File

@ -158,7 +158,7 @@ Popup {
anchors.topMargin: Style.current.halfPadding anchors.topMargin: Style.current.halfPadding
icon.name: "send" icon.name: "send"
onClicked: { onClicked: {
sendModal.selectFromAccount.selectedAccount = accountSelector.selectedAccount sendModal.selectedAccount = accountSelector.selectedAccount
sendModal.open() sendModal.open()
} }
} }

View File

@ -612,11 +612,12 @@ Item {
id: toastMessage id: toastMessage
} }
// Add SendModal here as it is used by the Wallet as well as the Browser // ToDo: move this to Global or similar in order to get rid of dynamic scoping
Loader { Loader {
id: sendModal id: sendModal
active: false active: false
property var selectedAccount
function open() { function open() {
this.active = true this.active = true
this.item.open() this.item.open()
@ -625,6 +626,11 @@ Item {
// this.sourceComponent = undefined // kill an opened instance // this.sourceComponent = undefined // kill an opened instance
this.active = false this.active = false
} }
onLoaded: {
if( item && sendModal.selectedAccount) {
item.selectFromAccount.selectedAccount = sendModal.selectedAccount
}
}
sourceComponent: SendModal { sourceComponent: SendModal {
store: appMain.rootStore store: appMain.rootStore
onOpened: { onOpened: {

View File

@ -107,7 +107,7 @@ ModalPopup {
RecipientSelector { RecipientSelector {
id: selectRecipient id: selectRecipient
accounts: root.store.accounts accounts: root.store.accounts
contacts: popup.store.addedContacts contacts: root.store.addedContacts
//% "Recipient" //% "Recipient"
label: qsTrId("recipient") label: qsTrId("recipient")
anchors.top: separator.bottom anchors.top: separator.bottom