diff --git a/src/app/searchPages/communities/searchCommunities.component.ts b/src/app/searchPages/communities/searchCommunities.component.ts index aca7fa6..96b07f5 100644 --- a/src/app/searchPages/communities/searchCommunities.component.ts +++ b/src/app/searchPages/communities/searchCommunities.component.ts @@ -178,9 +178,7 @@ export class SearchCommunitiesComponent { this.searchUtils.status = this.errorCodes.LOADING; this.disableForms = true; this.results = this.totalResults; - if (this.filters.length === 0 || (this.user && !this.userFilterLoaded)) { - this.filters = this.createFilters(); - } + this.filters = this.createFilters(); this.searchUtils.totalResults = 0; this.applyParams(params); } @@ -224,7 +222,7 @@ export class SearchCommunitiesComponent { this.checkFilters(params); this.sort(); this.searchUtils.totalResults = this.results.length; - this.searchPage.prepareFiltersToShow(this.filters, this.searchUtils.totalResults); + this.filters = this.searchPage.prepareFiltersToShow(this.filters, this.searchUtils.totalResults); this.results = this.results.slice((this.searchUtils.page - 1) * this.searchUtils.size, (this.searchUtils.page * this.searchUtils.size)); this.searchUtils.status = this.errorCodes.DONE; if (this.searchUtils.totalResults == 0) {