DEV: Trigger an app event when a card is shown (#14399)

This replaces the unused lastEvent field with an app event trigger.
This commit is contained in:
Bianca Nenciu 2021-09-21 15:51:45 +03:00 committed by GitHub
parent d940a8e41a
commit bba973f0d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ export default Mixin.create({
return false;
}
this.set("lastEvent", event);
this.appEvents.trigger("card:show", username, target, event);
const currentUsername = this.username;
if (username === currentUsername || this.loading === username) {
@ -304,7 +304,6 @@ export default Mixin.create({
visible: false,
username: null,
loading: null,
lastEvent: null,
cardTarget: null,
post: null,
isFixed: false,
@ -317,6 +316,7 @@ export default Mixin.create({
}
this._hide();
this.appEvents.trigger("card:hide");
},
willDestroyElement() {