Replace deprecated $on and $off with tiny-emitter
This commit is contained in:
parent
7a801f3ec3
commit
3b4d3f08f6
6 changed files with 21 additions and 18 deletions
|
|
@ -397,7 +397,7 @@ import { imageSize } from "image-size";
|
|||
import prettyBytes from "pretty-bytes";
|
||||
import RoomExport from "./RoomExport.vue";
|
||||
import EmojiPicker from 'vue3-emoji-picker';
|
||||
|
||||
import emitter from 'tiny-emitter/instance';
|
||||
|
||||
const READ_RECEIPT_TIMEOUT = 5000; /* How long a message must have been visible before the read marker is updated */
|
||||
const WINDOW_BUFFER_SIZE = 0.3; /** Relative window height of when we start paginating. Always keep this much loaded before and after our scroll position! */
|
||||
|
|
@ -562,7 +562,7 @@ export default {
|
|||
},
|
||||
|
||||
mounted() {
|
||||
this.$root.$on('audio-playback-ended', this.audioPlaybackEnded);
|
||||
emitter.on('audio-playback-ended', this.audioPlaybackEnded);
|
||||
const container = this.chatContainer;
|
||||
if (container) {
|
||||
this.scrollPosition = new ScrollPosition(container);
|
||||
|
|
@ -573,7 +573,7 @@ export default {
|
|||
},
|
||||
|
||||
beforeDestroy() {
|
||||
this.$root.$off('audio-playback-ended', this.audioPlaybackEnded);
|
||||
emitter.off('audio-playback-ended', this.audioPlaybackEnded);
|
||||
this.$audioPlayer.pause();
|
||||
this.stopRRTimer();
|
||||
if (this.retentionTimer) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue