fix: Replace the bus events with emitter in widget (#9584)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Fayaz Ahmed
2024-06-03 16:36:15 +05:30
committed by GitHub
parent af90f21cfd
commit 00ef9c475f
8 changed files with 12 additions and 12 deletions

View File

@@ -99,7 +99,7 @@ export default {
},
},
mounted() {
bus.$on(BUS_EVENTS.TOGGLE_REPLY_TO_MESSAGE, this.toggleReplyTo);
this.$emitter.on(BUS_EVENTS.TOGGLE_REPLY_TO_MESSAGE, this.toggleReplyTo);
},
methods: {
...mapActions('conversation', [

View File

@@ -97,9 +97,9 @@ export default {
},
onClickMessage() {
if (this.campaignId) {
bus.$emit(ON_CAMPAIGN_MESSAGE_CLICK, this.campaignId);
this.$emitter.emit(ON_CAMPAIGN_MESSAGE_CLICK, this.campaignId);
} else {
bus.$emit(ON_UNREAD_MESSAGE_CLICK);
this.$emitter.emit(ON_UNREAD_MESSAGE_CLICK);
}
},
},

View File

@@ -80,7 +80,7 @@ export default {
},
methods: {
openConversationView() {
bus.$emit(ON_UNREAD_MESSAGE_CLICK);
this.$emitter.emit(ON_UNREAD_MESSAGE_CLICK);
},
closeFullView() {
this.$emit('close');

View File

@@ -159,7 +159,7 @@ export default {
this.hasImageError = true;
},
toggleReply() {
bus.$emit(BUS_EVENTS.TOGGLE_REPLY_TO_MESSAGE, this.message);
this.$emitter.emit(BUS_EVENTS.TOGGLE_REPLY_TO_MESSAGE, this.message);
},
},
};