mirror of
https://github.com/discourse/discourse.git
synced 2025-03-03 17:59:20 +00:00
DEV: Trigger events when filtering replies (#11498)
This commit is contained in:
parent
c1ba3d786c
commit
89bf64c0bf
@ -254,6 +254,10 @@ export default RestModel.extend({
|
||||
filterReplies(postNumber) {
|
||||
this.cancelFilter();
|
||||
this.set("filterRepliesToPostNumber", postNumber);
|
||||
this.appEvents.trigger("post-stream:filter-replies", {
|
||||
topic_id: this.get("topic.id"),
|
||||
post_number: postNumber,
|
||||
});
|
||||
return this.refresh({ refreshInPlace: true }).then(() => {
|
||||
const element = document.querySelector(`#post_${postNumber}`);
|
||||
|
||||
@ -280,6 +284,10 @@ export default RestModel.extend({
|
||||
filterUpwards(postID) {
|
||||
this.cancelFilter();
|
||||
this.set("filterUpwardsPostID", postID);
|
||||
this.appEvents.trigger("post-stream:filter-upwards", {
|
||||
topic_id: this.get("topic.id"),
|
||||
post_id: postID,
|
||||
});
|
||||
return this.refresh({ refreshInPlace: true }).then(() => {
|
||||
this.appEvents.trigger("post-stream:refresh");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user