Vue lifecycle changes
destroyed -> unmounted, beforeDestroy -> beforeUnmount
This commit is contained in:
parent
ae312db784
commit
2c5b386af9
18 changed files with 20 additions and 20 deletions
|
|
@ -44,7 +44,7 @@ export default {
|
|||
mounted() {
|
||||
this.event.on("Event.localEventIdReplaced", this.onLocalEventIdReplaced);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.$audioPlayer.removeListener(this._uid);
|
||||
this.event.off("Event.localEventIdReplaced", this.onLocalEventIdReplaced);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ export default {
|
|||
this.reactions = this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), 'm.annotation', 'm.reaction');
|
||||
this.event.on("Event.relationsCreated", this.onRelationsCreated);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.event.off("Event.relationsCreated", this.onRelationsCreated);
|
||||
if (this.reactions) {
|
||||
this.reactions.off('Relations.add', this.onAddRelation);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ export default {
|
|||
this.room.on("Room.receipt", this.onReceipt);
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (this.room) {
|
||||
this.room.off("Room.receipt", this.onReceipt);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export default {
|
|||
mounted() {
|
||||
this.loadAttachmentSource(this.event);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.loadAttachmentSource(null); // Release
|
||||
},
|
||||
computed: {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export default {
|
|||
this.reactions = this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), 'm.annotation', 'm.reaction');
|
||||
this.event.on("Event.relationsCreated", this.onRelationsCreated);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.event.off("Event.relationsCreated", this.onRelationsCreated);
|
||||
if (this.reactions) {
|
||||
this.reactions.off('Relations.add', this.onAddRelation);
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ export default {
|
|||
"";
|
||||
this.updateAnswers();
|
||||
},
|
||||
destroyed() {
|
||||
unmounted() {
|
||||
this.$matrix.off("Room.timeline", this.pollMixinOnEvent);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (this.pollResponseRelations) {
|
||||
this.pollResponseRelations.off("Relations.add", this.onAddRelation);
|
||||
this.pollResponseRelations = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue