work around sync issues by reloading page when switching game

This commit is contained in:
Jesse D. McDonald 2020-03-15 20:09:06 -05:00
parent 2e6764ffb5
commit 8a3e3ca4f2
1 changed files with 5 additions and 3 deletions

View File

@ -750,14 +750,16 @@ function switchGameId(newId){
return; return;
} }
boardElem.data('gameId', newId);
location.hash = '#/' + newId;
if (gameId) { if (gameId) {
//gun.get(PacoSakoUUID).get('games').get(gameId).off(); //gun.get(PacoSakoUUID).get('games').get(gameId).off();
//gun.get(PacoSakoUUID).get('meta').get(gameId).off(); //gun.get(PacoSakoUUID).get('meta').get(gameId).off();
location.reload();
return;
} }
boardElem.data('gameId', newId);
location.hash = '#/' + newId;
const notifyAfter = new Date().getTime() + 2000; const notifyAfter = new Date().getTime() + 2000;
$(window).data('notifyAfter', new Date().getTime() + 2000); $(window).data('notifyAfter', new Date().getTime() + 2000);
window.setTimeout(function() { window.setTimeout(function() {