From f1160a1534a75bcd010ca61610db4885117bf5d3 Mon Sep 17 00:00:00 2001 From: Edwin Lin Date: Sun, 22 Mar 2020 10:41:05 -0700 Subject: [PATCH] =?UTF-8?q?load=20scene=20from=20localStorage=20in=20colla?= =?UTF-8?q?boration=20if=20user=20is=20first=E2=80=A6=20(#1036)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * load scene from localStorage in collaboration if user is first in room * load scene from localStorage in collaboration prior to syncing with server * fix merge Co-authored-by: dwelle --- src/components/App.tsx | 5 +++-- src/i18n.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 4c0bf4cdc..e1010d334 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -351,13 +351,14 @@ export class App extends React.Component { return; } + const scene = await loadScene(null); + this.syncActionResult(scene); + const roomMatch = getCollaborationLinkData(window.location.href); if (roomMatch) { this.initializeSocketClient(); return; } - const scene = await loadScene(null); - this.syncActionResult(scene); window.addEventListener("beforeunload", this.beforeUnload); } diff --git a/src/i18n.ts b/src/i18n.ts index 65f94ac6b..55efd91f2 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -10,7 +10,7 @@ export const languages = [ label: "Bahasa Indonesia", data: require("./locales/id-ID.json"), }, - { lng: "hu-HU", label: "Magyar", data: require("./locales/hu-HU.json") }, + { lng: "hu-HU", label: "Magyar", data: require("./locales/hu-HU.json") }, { lng: "no-No", label: "Norsk", data: require("./locales/no-NO.json") }, { lng: "pl-PL", label: "Polski", data: require("./locales/pl-PL.json") }, { lng: "pt-PT", label: "Português", data: require("./locales/pt-PT.json") },