improve PWA and last room strating
This commit is contained in:
parent
1ad9f5b045
commit
707040b506
6 changed files with 34 additions and 153 deletions
|
@ -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 +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue