mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Teardown appEvent listener in edit-notification-clicks-tracker
This commit is contained in:
parent
8af0674b68
commit
8bb911e038
@ -4,13 +4,15 @@ export default {
|
|||||||
name: "edit-notification-clicks-tracker",
|
name: "edit-notification-clicks-tracker",
|
||||||
|
|
||||||
initialize(container) {
|
initialize(container) {
|
||||||
container
|
this.appEvents = container.lookup("service:app-events");
|
||||||
.lookup("service:app-events")
|
this.appEvents.on("edit-notification:clicked", this, this.handleClick);
|
||||||
.on(
|
},
|
||||||
"edit-notification:clicked",
|
|
||||||
({ topicId, postNumber, revisionNumber }) => {
|
handleClick({ topicId, postNumber, revisionNumber }) {
|
||||||
setLastEditNotificationClick(topicId, postNumber, revisionNumber);
|
setLastEditNotificationClick(topicId, postNumber, revisionNumber);
|
||||||
}
|
},
|
||||||
);
|
|
||||||
|
teardown() {
|
||||||
|
this.appEvents.off("edit-notification:clicked", this, this.handleClick);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user