diff options
| author | rating89us <45968869+rating89us@users.noreply.github.com> | 2021-06-10 12:59:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-10 12:59:39 +0200 |
| commit | 417eaeae28ed5d1f5054fc6610b90a845a4f4ef4 (patch) | |
| tree | 2ffd37620426697846c983545484f19d73a5558c | |
| parent | 2946127ed791ef8dd6dc430b681a14cd5bd2d71e (diff) | |
| download | monzero-gui-417eaeae28ed5d1f5054fc6610b90a845a4f4ef4.tar.gz monzero-gui-417eaeae28ed5d1f5054fc6610b90a845a4f4ef4.tar.xz monzero-gui-417eaeae28ed5d1f5054fc6610b90a845a4f4ef4.zip | |
History: stay on the same page after editing description
| -rw-r--r-- | pages/History.qml | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pages/History.qml b/pages/History.qml index 03d30c5e..94b83ee2 100644 --- a/pages/History.qml +++ b/pages/History.qml @@ -1248,7 +1248,7 @@ Rectangle { if(res[i].state === 'copyable_address') (address ? root.toClipboard(address) : root.toClipboard(addressField.text)); if(res[i].state === 'copyable_receiving_address') root.toClipboard(currentWallet.address(subaddrAccount, subaddrIndex)); if(res[i].state === 'copyable_txkey') root.getTxKey(hash, res[i]); - if(res[i].state === 'set_tx_note') root.editDescription(hash, tx_note); + if(res[i].state === 'set_tx_note') root.editDescription(hash, tx_note, root.txPage); if(res[i].state === 'details') root.showTxDetails(hash, paymentId, destinations, subaddrAccount, subaddrIndex, dateTime, displayAmount, isout); if(res[i].state === 'proof') root.showTxProof(hash, paymentId, destinations, subaddrAccount, subaddrIndex); doCollapse = false; @@ -1409,7 +1409,7 @@ Rectangle { } } - function updateFilter(){ + function updateFilter(currentPage){ // applying filters root.txData = JSON.parse(JSON.stringify(root.txModelData)); // deepcopy @@ -1459,6 +1459,9 @@ Rectangle { root.updateSort(); root.updateDisplay(root.txOffset, root.txMax); + if (currentPage) { + root.paginationJump(parseInt(currentPage)); + } } function updateSort(){ @@ -1597,20 +1600,20 @@ Rectangle { root.txCount = root.txData.length; } - function update() { + function update(currentPage) { // handle outside mutation of tx model; incoming/outgoing funds or new blocks. Update table. currentWallet.history.refresh(currentWallet.currentSubaddressAccount); root.updateTransactionsFromModel(); - root.updateFilter(); + root.updateFilter(currentPage); } - function editDescription(_hash, _tx_note){ + function editDescription(_hash, _tx_note, currentPage){ inputDialog.labelText = qsTr("Set description:") + translationManager.emptyString; inputDialog.onAcceptedCallback = function() { appWindow.currentWallet.setUserNote(_hash, inputDialog.inputText); appWindow.showStatusMessage(qsTr("Updated description."),3); - root.update(); + root.update(currentPage); } inputDialog.onRejectedCallback = null; inputDialog.open(_tx_note); |
