Skip to content

Commit

Permalink
! Fix restoring filtered history having unnecessary delay
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE committed Aug 20, 2024
1 parent 1b703e7 commit 987b10a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/renderer/views/History/History.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default defineComponent({
const oldQuery = this.$route.query.searchQueryText ?? ''
if (oldQuery !== null && oldQuery !== '') {
// `handleQueryChange` must be called after `filterHistoryDebounce` assigned
this.handleQueryChange(oldQuery, this.$route.query.searchDataLimit)
this.handleQueryChange(oldQuery, this.$route.query.searchDataLimit, true)
} else {
// Only display unfiltered data when no query used last time
this.filterHistory()
Expand All @@ -94,15 +94,15 @@ export default defineComponent({
document.removeEventListener('keydown', this.keyboardShortcutHandler)
},
methods: {
handleQueryChange(val, customLimit = null) {
handleQueryChange(val, customLimit = null, filterNow = false) {
this.query = val

const newLimit = customLimit ?? 100
this.searchDataLimit = newLimit

this.saveStateInRouter(val, newLimit)

this.filterHistoryAsync()
filterNow ? this.filterHistory() : this.filterHistoryAsync()
},

increaseLimit: function () {
Expand Down

0 comments on commit 987b10a

Please sign in to comment.