fix composing new message and unmounting listeners

This commit is contained in:
liamcottle 2024-08-06 00:15:09 +12:00
parent ec63939b7c
commit 68df149c82
5 changed files with 85 additions and 54 deletions

View file

@ -141,16 +141,15 @@ export default {
};
},
created() {
// listen for websocket messages
WebSocketConnection.on("message", this.onWebsocketMessage);
},
beforeDestroy() {
beforeUnmount() {
// stop listening for websocket messages
WebSocketConnection.off("message", this.onWebsocketMessage);
},
mounted() {
// listen for websocket messages
WebSocketConnection.on("message", this.onWebsocketMessage);
// fixme: this is called by the micron-parser.js
window.onNodePageUrlClick = (url) => {
this.onNodePageUrlClick(url);