History: don't reset date filtering when switching page

This commit is contained in:
selsta 2019-07-04 15:17:41 +02:00
parent c7956f76ea
commit 14619b9437
No known key found for this signature in database
GPG key ID: 2EA0A99A8B07AE5E

View file

@ -1343,13 +1343,15 @@ Rectangle {
root.updateDisplay(root.txOffset, root.txMax); root.updateDisplay(root.txOffset, root.txMax);
} }
function reset() { function reset(keepDate) {
root.txOffset = 0; root.txOffset = 0;
root.txMax = 5; root.txMax = 5;
if (typeof root.model !== 'undefined' && root.model != null) { if (typeof root.model !== 'undefined' && root.model != null) {
root.model.dateFromFilter = "2014-04-18" // genesis block if (!keepDate) {
root.model.dateToFilter = "9999-09-09" // fix before september 9999 root.model.dateFromFilter = "2014-04-18" // genesis block
root.model.dateToFilter = "9999-09-09" // fix before september 9999
}
// negative values disable filters here; // negative values disable filters here;
root.model.amountFromFilter = -1; root.model.amountFromFilter = -1;
root.model.amountToFilter = -1; root.model.amountToFilter = -1;
@ -1704,6 +1706,6 @@ Rectangle {
function onPageClosed(){ function onPageClosed(){
root.initialized = false; root.initialized = false;
root.reset(); root.reset(true);
} }
} }