improve PWA and last room strating

This commit is contained in:
Gregoire Parant 2021-08-04 13:33:58 +02:00
parent 1ad9f5b045
commit 707040b506
6 changed files with 34 additions and 153 deletions

View file

@ -105,6 +105,15 @@ class ConnectionManager {
let roomPath: string;
if (connexionType === GameConnexionTypes.empty) {
roomPath = window.location.protocol + "//" + window.location.host + START_ROOM_URL;
//get last room path from cache api
try {
const lastRoomUrl = await localUserStore.getLastRoomUrlCacheApi();
if (lastRoomUrl != undefined) {
roomPath = lastRoomUrl;
}
} catch (err) {
console.error(err);
}
} else {
roomPath =
window.location.protocol +