X-Git-Url: https://git.auder.net/pieces/Cwda/n_white_knight.svg?a=blobdiff_plain;f=client%2Fsrc%2Futils%2FgameStorage.js;h=99206edeb567a182fcf40c4b046166405e4a3c9e;hb=d4605a02ac9edd27b3884537dfdc67945d950e06;hp=109c8251c04e90e2a99534e0064b6a771373380e;hpb=5f918a278904266a2a66a3c8e2a3655f37c2d2a7;p=vchess.git diff --git a/client/src/utils/gameStorage.js b/client/src/utils/gameStorage.js index 109c8251..99206ede 100644 --- a/client/src/utils/gameStorage.js +++ b/client/src/utils/gameStorage.js @@ -87,7 +87,10 @@ export const GameStorage = { Object.keys(obj).forEach(k => { if (k == "move") game.moves.push(obj[k]); else if (k == "chat") game.chats.push(obj[k]); + else if (k == "chatRead") game.chatRead = Date.now(); else if (k == "delchat") game.chats = []; + else if (k == "playerName") + game.players[obj[k].idx].name = obj[k].name; else game[k] = obj[k]; }); objectStore.put(game); //save updated data