FIX: Don't cancel filtering on second "n replies" tap (#11975)
Fixes an issue introduced in 0f31a221c9
.
This commit is contained in:
parent
eb29827e9d
commit
85310f82f5
|
@ -440,13 +440,17 @@ createWidget("post-contents", {
|
|||
},
|
||||
|
||||
toggleFilteredRepliesView() {
|
||||
const post = this.findAncestorModel();
|
||||
const controller = this.register.lookup("controller:topic");
|
||||
if (post.get("topic.postStream.filterRepliesToPostNumber")) {
|
||||
controller.send(
|
||||
"cancelFilter",
|
||||
post.get("topic.postStream.filterRepliesToPostNumber")
|
||||
const post = this.findAncestorModel(),
|
||||
controller = this.register.lookup("controller:topic"),
|
||||
currentFilterPostNumber = post.get(
|
||||
"topic.postStream.filterRepliesToPostNumber"
|
||||
);
|
||||
|
||||
if (
|
||||
currentFilterPostNumber &&
|
||||
currentFilterPostNumber === post.post_number
|
||||
) {
|
||||
controller.send("cancelFilter", currentFilterPostNumber);
|
||||
this.state.filteredRepliesShown = false;
|
||||
} else {
|
||||
this.state.filteredRepliesShown = true;
|
||||
|
|
Loading…
Reference in New Issue