From cf120dbcbf025b0111dd93d141cb130138a0c02a Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 19 May 2024 16:57:23 +0800 Subject: [PATCH] fix the bug that cannot load more transaction after opening and clicking cancel button custom time range dialog --- src/views/desktop/transactions/ListPage.vue | 13 +++++++++---- src/views/mobile/transactions/ListPage.vue | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/views/desktop/transactions/ListPage.vue b/src/views/desktop/transactions/ListPage.vue index 638a0ae2..c3e7109e 100644 --- a/src/views/desktop/transactions/ListPage.vue +++ b/src/views/desktop/transactions/ListPage.vue @@ -331,8 +331,8 @@ @@ -417,6 +417,8 @@ export default { temporaryCountPerPage: null, totalCount: 1, searchKeyword: '', + customMinDatetime: 0, + customMaxDatetime: 0, currentPageTransactions: [], categoryMenuState: false, alwaysShowNav: mdAndUp.value, @@ -768,8 +770,11 @@ export default { if (recentDateRange.dateType === datetimeConstants.allDateRanges.Custom.type && !recentDateRange.minTime && !recentDateRange.maxTime) { // Custom if (!this.query.minTime || !this.query.maxTime) { - this.query.maxTime = getActualUnixTimeForStore(getCurrentUnixTime(), this.currentTimezoneOffsetMinutes, getBrowserTimezoneOffsetMinutes()); - this.query.minTime = getSpecifiedDayFirstUnixTime(this.query.maxTime); + this.customMaxDatetime = getActualUnixTimeForStore(getCurrentUnixTime(), this.currentTimezoneOffsetMinutes, getBrowserTimezoneOffsetMinutes()); + this.customMinDatetime = getSpecifiedDayFirstUnixTime(this.customMaxDatetime); + } else { + this.customMaxDatetime = this.query.maxTime; + this.customMinDatetime = this.query.minTime; } this.showCustomDateRangeDialog = true; diff --git a/src/views/mobile/transactions/ListPage.vue b/src/views/mobile/transactions/ListPage.vue index fd236320..3924a794 100644 --- a/src/views/mobile/transactions/ListPage.vue +++ b/src/views/mobile/transactions/ListPage.vue @@ -274,8 +274,8 @@ @@ -454,6 +454,8 @@ export default { loading: true, loadingError: null, loadingMore: false, + customMinDatetime: 0, + customMaxDatetime: 0, transactionToDelete: null, showDatePopover: false, showTypePopover: false, @@ -681,8 +683,11 @@ export default { changeDateFilter(dateType) { if (dateType === this.allDateRanges.Custom.type) { // Custom if (!this.query.minTime || !this.query.maxTime) { - this.query.maxTime = getActualUnixTimeForStore(getCurrentUnixTime(), this.currentTimezoneOffsetMinutes, getBrowserTimezoneOffsetMinutes()); - this.query.minTime = getSpecifiedDayFirstUnixTime(this.query.maxTime); + this.customMaxDatetime = getActualUnixTimeForStore(getCurrentUnixTime(), this.currentTimezoneOffsetMinutes, getBrowserTimezoneOffsetMinutes()); + this.customMinDatetime = getSpecifiedDayFirstUnixTime(this.customMaxDatetime); + } else { + this.customMaxDatetime = this.query.maxTime; + this.customMinDatetime = this.query.minTime; } this.showCustomDateRangeSheet = true;