Skip to content

Commit

Permalink
do not reset filter if query is not changed
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitchauhan-aka committed Apr 29, 2024
1 parent 2373f0f commit f754ae7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/renderer/components/top-nav/top-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ export default defineComponent({

clearLocalSearchSuggestionsSession()

// Reset search filters if searching another query
if (this.$route.params.query !== query) {
this.$store.commit('setSearchSettingsToDefault')
this.searchFilterValueChanged = false
}

this.getYoutubeUrlInfo(query).then((result) => {
switch (result.urlType) {
case 'video': {
Expand Down Expand Up @@ -217,9 +223,6 @@ export default defineComponent({
}
})

// Reset search filters
this.$store.commit('setSearchSettingsToDefault')
this.searchFilterValueChanged = false
// Close the filter panel
this.showFilters = false
},
Expand Down

0 comments on commit f754ae7

Please sign in to comment.