Browse Source

load scene from localStorage in collaboration if user is first… (#1036)

* 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 <luzar.david@gmail.com>
vanilla_orig
Edwin Lin 5 years ago
parent
commit
f1160a1534
No account linked to committer's email address
2 changed files with 4 additions and 3 deletions
  1. 3
    2
      src/components/App.tsx
  2. 1
    1
      src/i18n.ts

+ 3
- 2
src/components/App.tsx View File

351
       return;
351
       return;
352
     }
352
     }
353
 
353
 
354
+    const scene = await loadScene(null);
355
+    this.syncActionResult(scene);
356
+
354
     const roomMatch = getCollaborationLinkData(window.location.href);
357
     const roomMatch = getCollaborationLinkData(window.location.href);
355
     if (roomMatch) {
358
     if (roomMatch) {
356
       this.initializeSocketClient();
359
       this.initializeSocketClient();
357
       return;
360
       return;
358
     }
361
     }
359
-    const scene = await loadScene(null);
360
-    this.syncActionResult(scene);
361
 
362
 
362
     window.addEventListener("beforeunload", this.beforeUnload);
363
     window.addEventListener("beforeunload", this.beforeUnload);
363
   }
364
   }

+ 1
- 1
src/i18n.ts View File

10
     label: "Bahasa Indonesia",
10
     label: "Bahasa Indonesia",
11
     data: require("./locales/id-ID.json"),
11
     data: require("./locales/id-ID.json"),
12
   },
12
   },
13
-  { lng: "hu-HU", label: "Magyar", data: require("./locales/hu-HU.json") },  
13
+  { lng: "hu-HU", label: "Magyar", data: require("./locales/hu-HU.json") },
14
   { lng: "no-No", label: "Norsk", data: require("./locales/no-NO.json") },
14
   { lng: "no-No", label: "Norsk", data: require("./locales/no-NO.json") },
15
   { lng: "pl-PL", label: "Polski", data: require("./locales/pl-PL.json") },
15
   { lng: "pl-PL", label: "Polski", data: require("./locales/pl-PL.json") },
16
   { lng: "pt-PT", label: "Português", data: require("./locales/pt-PT.json") },
16
   { lng: "pt-PT", label: "Português", data: require("./locales/pt-PT.json") },

Loading…
Cancel
Save