ソースを参照

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年前
コミット
f1160a1534
コミッターのメールアドレスに関連付けられたアカウントが存在しません
2個のファイルの変更4行の追加3行の削除
  1. 3
    2
      src/components/App.tsx
  2. 1
    1
      src/i18n.ts

+ 3
- 2
src/components/App.tsx ファイルの表示

@@ -351,13 +351,14 @@ export class App extends React.Component<any, AppState> {
351 351
       return;
352 352
     }
353 353
 
354
+    const scene = await loadScene(null);
355
+    this.syncActionResult(scene);
356
+
354 357
     const roomMatch = getCollaborationLinkData(window.location.href);
355 358
     if (roomMatch) {
356 359
       this.initializeSocketClient();
357 360
       return;
358 361
     }
359
-    const scene = await loadScene(null);
360
-    this.syncActionResult(scene);
361 362
 
362 363
     window.addEventListener("beforeunload", this.beforeUnload);
363 364
   }

+ 1
- 1
src/i18n.ts ファイルの表示

@@ -10,7 +10,7 @@ export const languages = [
10 10
     label: "Bahasa Indonesia",
11 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 14
   { lng: "no-No", label: "Norsk", data: require("./locales/no-NO.json") },
15 15
   { lng: "pl-PL", label: "Polski", data: require("./locales/pl-PL.json") },
16 16
   { lng: "pt-PT", label: "Português", data: require("./locales/pt-PT.json") },

読み込み中…
キャンセル
保存