Merge pull request #2007 from thecodingmachine/fix-bubble-lock-away-mode
fix locking bubble when returning from away mode
This commit is contained in:
commit
469f9d9533
@ -76,7 +76,7 @@ import { userIsAdminStore } from "../../Stores/GameStore";
|
|||||||
import { contactPageStore } from "../../Stores/MenuStore";
|
import { contactPageStore } from "../../Stores/MenuStore";
|
||||||
import type { WasCameraUpdatedEvent } from "../../Api/Events/WasCameraUpdatedEvent";
|
import type { WasCameraUpdatedEvent } from "../../Api/Events/WasCameraUpdatedEvent";
|
||||||
import { audioManagerFileStore } from "../../Stores/AudioManagerStore";
|
import { audioManagerFileStore } from "../../Stores/AudioManagerStore";
|
||||||
import { currentPlayerGroupIdStore, currentPlayerGroupLockStateStore } from "../../Stores/CurrentPlayerGroupStore";
|
import { currentPlayerGroupLockStateStore } from "../../Stores/CurrentPlayerGroupStore";
|
||||||
|
|
||||||
import EVENT_TYPE = Phaser.Scenes.Events;
|
import EVENT_TYPE = Phaser.Scenes.Events;
|
||||||
import Texture = Phaser.Textures.Texture;
|
import Texture = Phaser.Textures.Texture;
|
||||||
@ -711,10 +711,6 @@ export class GameScene extends DirtyScene {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.currentPlayerGroupIdStoreUnsubscribe = currentPlayerGroupIdStore.subscribe((groupId) => {
|
|
||||||
this.currentPlayerGroupId = groupId;
|
|
||||||
});
|
|
||||||
|
|
||||||
Promise.all([
|
Promise.all([
|
||||||
this.connectionAnswerPromiseDeferred.promise as Promise<unknown>,
|
this.connectionAnswerPromiseDeferred.promise as Promise<unknown>,
|
||||||
...scriptPromises,
|
...scriptPromises,
|
||||||
@ -847,8 +843,7 @@ export class GameScene extends DirtyScene {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.connection.groupUsersUpdateMessageStream.subscribe((message) => {
|
this.connection.groupUsersUpdateMessageStream.subscribe((message) => {
|
||||||
// TODO: how else can we deduce our current group?
|
this.currentPlayerGroupId = message.groupId;
|
||||||
currentPlayerGroupIdStore.set(message.groupId);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1870,7 +1865,6 @@ ${escapedMessage}
|
|||||||
break;
|
break;
|
||||||
case "DeleteGroupEvent": {
|
case "DeleteGroupEvent": {
|
||||||
this.doDeleteGroup(event.groupId);
|
this.doDeleteGroup(event.groupId);
|
||||||
currentPlayerGroupIdStore.set(undefined);
|
|
||||||
currentPlayerGroupLockStateStore.set(undefined);
|
currentPlayerGroupLockStateStore.set(undefined);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { writable } from "svelte/store";
|
import { writable } from "svelte/store";
|
||||||
|
|
||||||
export const currentPlayerGroupIdStore = writable<number | undefined>(undefined);
|
|
||||||
export const currentPlayerGroupLockStateStore = writable<boolean | undefined>(undefined);
|
export const currentPlayerGroupLockStateStore = writable<boolean | undefined>(undefined);
|
||||||
|
Loading…
Reference in New Issue
Block a user