FIX: Don't leak event listeners in user-activity-drafts (#8682)

This commit is contained in:
Jarek Radosz 2020-01-08 16:55:10 +01:00 committed by GitHub
parent cf60de59b1
commit 502f154cfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,9 +12,16 @@ export default DiscourseRoute.extend({
setupController(controller, model) {
controller.set("model", model);
},
activate() {
this.appEvents.on("draft:destroyed", this, this.refresh);
},
deactivate() {
this.appEvents.off("draft:destroyed", this, this.refresh);
},
actions: {
didTransition() {
this.controllerFor("user-activity")._showFooter();