DEV: Clear filters when navigating to a post (#12557)

This commit is contained in:
Penar Musaraj 2021-03-30 13:55:15 -04:00 committed by GitHub
parent 65ad8750c7
commit 524890c5e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -370,7 +370,7 @@ const DiscourseURL = EmberObject.extend({
opts.nearPost = topicController.get("model.highest_post_number");
}
opts.cancelSummary = true;
opts.cancelFilter = true;
postStream.refresh(opts).then(() => {
const closest = postStream.closestPostNumberFor(opts.nearPost || 1);

View File

@ -311,9 +311,9 @@ export default RestModel.extend({
opts = opts || {};
opts.nearPost = parseInt(opts.nearPost, 10);
if (opts.cancelSummary) {
this.set("summary", false);
delete opts.cancelSummary;
if (opts.cancelFilter) {
this.cancelFilter();
delete opts.cancelFilter;
}
const topic = this.topic;