Skip to content

Commit

Permalink
refactor: no longer need to push gambits to q
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Sep 22, 2023
1 parent e37f7d5 commit bdbacdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ export default function addSubscriptionFilter() {
extend(DiscussionListState.prototype, 'requestParams', function (params) {
if (this.params.onFollowing) {
params.filter ||= {};

if (params.filter.q) {
params.filter.q += ' is:following';
} else {
params.filter.subscription = 'following';
}
params.filter.subscription = 'following';
}
});
}
10 changes: 2 additions & 8 deletions extensions/tags/js/src/forum/addTagFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,8 @@ export default function addTagFilter() {
}

if (this.params.tags) {
const filter = params.filter ?? {};
filter.tag = this.params.tags;
// TODO: replace this with a more robust system.
const q = filter.q;
if (q) {
filter.q = `${q} tag:${this.params.tags}`;
}
params.filter = filter;
params.filter ||= {};
params.filter.tag = this.params.tags;
}
});
}

0 comments on commit bdbacdd

Please sign in to comment.