diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 8ab0f6e3..16f34977 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -181,6 +181,7 @@ export class GameScene extends DirtyScene { private followUsersColorStoreUnsubscribe!: Unsubscriber; private userIsJitsiDominantSpeakerStoreUnsubscriber!: Unsubscriber; private jitsiParticipantsCountStoreUnsubscriber!: Unsubscriber; + private availabilityStatusStoreUnsubscriber!: Unsubscriber; private biggestAvailableAreaStoreUnsubscribe!: () => void; MapUrlFile: string; @@ -698,7 +699,7 @@ export class GameScene extends DirtyScene { this.tryChangeShowVoiceIndicatorState(this.jitsiDominantSpeaker && this.jitsiParticipantsCount > 1); }); - availabilityStatusStore.subscribe((status) => { + this.availabilityStatusStoreUnsubscriber = availabilityStatusStore.subscribe((status) => { this.connection?.emitPlayerStatusChange(status); this.CurrentPlayer.setStatus(status); }); @@ -1615,6 +1616,7 @@ ${escapedMessage} this.biggestAvailableAreaStoreUnsubscribe(); this.userIsJitsiDominantSpeakerStoreUnsubscriber(); this.jitsiParticipantsCountStoreUnsubscriber(); + this.availabilityStatusStoreUnsubscriber(); iframeListener.unregisterAnswerer("getState"); iframeListener.unregisterAnswerer("loadTileset"); iframeListener.unregisterAnswerer("getMapData");