load from localStorage only if not in multiplayer (#1074)
This commit is contained in:
parent
104e48b6cb
commit
42df058223
@ -332,6 +332,7 @@ export class App extends React.Component<any, AppState> {
|
|||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
document.addEventListener("gestureend", this.onGestureEnd as any, false);
|
document.addEventListener("gestureend", this.onGestureEnd as any, false);
|
||||||
|
window.addEventListener("beforeunload", this.beforeUnload);
|
||||||
|
|
||||||
const searchParams = new URLSearchParams(window.location.search);
|
const searchParams = new URLSearchParams(window.location.search);
|
||||||
const id = searchParams.get("id");
|
const id = searchParams.get("id");
|
||||||
@ -351,16 +352,14 @@ export class App extends React.Component<any, AppState> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const scene = await loadScene(null);
|
|
||||||
this.syncActionResult(scene);
|
|
||||||
|
|
||||||
const roomMatch = getCollaborationLinkData(window.location.href);
|
const roomMatch = getCollaborationLinkData(window.location.href);
|
||||||
if (roomMatch) {
|
if (roomMatch) {
|
||||||
this.initializeSocketClient();
|
this.initializeSocketClient();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("beforeunload", this.beforeUnload);
|
const scene = await loadScene(null);
|
||||||
|
this.syncActionResult(scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
public componentWillUnmount() {
|
public componentWillUnmount() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user