Skip to content

Commit c45b3cf

Browse files
committed
fix: load game window before events are fired so ui state is correct
1 parent a2667d2 commit c45b3cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

electron/renderer/context/game.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ export const GameProvider: React.FC<GameProviderProps> = (
6767
useSubscribe(['character:play:starting'], async (character: Character) => {
6868
logger.debug('character:play:starting', { character });
6969
setShowPlayStartingOverlay(true);
70+
await router.push('/game');
7071
});
7172

7273
useSubscribe(['character:play:started'], async (character: Character) => {
7374
logger.debug('character:play:started', { character });
7475
setShowPlayStartingOverlay(false);
7576
pubsub.publish('sidebar:hide');
76-
await router.push('/game');
7777
});
7878

7979
useSubscribe(['character:play:stopping'], async (character: Character) => {

0 commit comments

Comments
 (0)