From a1a9eea758cf1464052722f2d929311ea1c18bc7 Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Sat, 9 May 2020 13:05:32 -0500 Subject: [PATCH] fix for not notifying on next move after switching game --- js/pacosako_ui.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/pacosako_ui.js b/js/pacosako_ui.js index 33d91ed..3cd866e 100644 --- a/js/pacosako_ui.js +++ b/js/pacosako_ui.js @@ -1276,6 +1276,12 @@ $(function (){ function notifyLocalMove(game, gameId) { if (!game) { delete lastNotifyState[gameId]; + + /* Preload the last-known state if we already have data for this game */ + const localMeta = IO.getCachedMeta(); + if (gameId in localMeta) { + notifyForGame(localMeta[gameId], gameId); + } } else { lastNotifyState[gameId] = lastNotifyState[gameId] || {}; lastNotifyState[gameId].moves = game.moves;