Merge pull request #10014 from f321x/fix_qml_label_setting
fix: qml: update tx label on detailsChanged signal
This commit is contained in:
@@ -642,11 +642,21 @@ Item {
|
|||||||
|
|
||||||
onRequestPaid: {
|
onRequestPaid: {
|
||||||
close()
|
close()
|
||||||
|
var capturedHistoryModel = Daemon.currentWallet.historyModel
|
||||||
if (isLightning) {
|
if (isLightning) {
|
||||||
app.stack.push(Qt.resolvedUrl('LightningPaymentDetails.qml'), {'key': key})
|
var page = app.stack.push(Qt.resolvedUrl('LightningPaymentDetails.qml'), {'key': key})
|
||||||
|
var capturedKey = key
|
||||||
|
page.detailsChanged.connect(function() {
|
||||||
|
capturedHistoryModel.updateTxLabel(capturedKey, page.label)
|
||||||
|
}
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
let paidTxid = getPaidTxid()
|
let paidTxid = getPaidTxid()
|
||||||
app.stack.push(Qt.resolvedUrl('TxDetails.qml'), {'txid': paidTxid})
|
var page = app.stack.push(Qt.resolvedUrl('TxDetails.qml'), {'txid': paidTxid})
|
||||||
|
page.detailsChanged.connect(function() {
|
||||||
|
capturedHistoryModel.updateTxLabel(paidTxid, page.label)
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClosed: destroy()
|
onClosed: destroy()
|
||||||
|
|||||||
Reference in New Issue
Block a user