mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-12 15:49:28 -08:00
Webatrice: Adding game created to persistence layer (#5067)
This commit is contained in:
@@ -57,4 +57,9 @@ export const Actions = {
|
||||
name,
|
||||
amount
|
||||
}),
|
||||
|
||||
gameCreated: (roomId) => ({
|
||||
type: Types.GAME_CREATED,
|
||||
roomId
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -47,4 +47,8 @@ export const Dispatch = {
|
||||
removeMessages: (roomId, name, amount) => {
|
||||
store.dispatch(Actions.removeMessages(roomId, name, amount));
|
||||
},
|
||||
|
||||
gameCreated: (roomId) => {
|
||||
store.dispatch(Actions.gameCreated(roomId));
|
||||
},
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ export const Types = {
|
||||
USER_LEFT: '[Rooms] User Left',
|
||||
SORT_GAMES: '[Rooms] Sort Games',
|
||||
REMOVE_MESSAGES: '[Rooms] Remove Messages',
|
||||
GAME_CREATED: '[Rooms] Game Created',
|
||||
};
|
||||
|
||||
export const MAX_ROOM_MESSAGES = 1000;
|
||||
|
||||
@@ -54,7 +54,7 @@ export class RoomPersistence {
|
||||
};
|
||||
|
||||
static gameCreated(roomId: number) {
|
||||
console.log('gameCreated', roomId);
|
||||
RoomsDispatch.gameCreated(roomId);
|
||||
}
|
||||
|
||||
static joinedGame(roomId: number, gameId: number) {
|
||||
|
||||
Reference in New Issue
Block a user