From 94e514cd0910714c8468d11e65b82ef366c6f2c3 Mon Sep 17 00:00:00 2001 From: AlexStep Date: Tue, 26 Sep 2017 14:28:01 +0200 Subject: [PATCH] Refactoring --- src/app.client.js | 9 +++++++-- src/model/games.js | 2 -- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app.client.js b/src/app.client.js index 33e1a18..1a3e864 100644 --- a/src/app.client.js +++ b/src/app.client.js @@ -13,10 +13,12 @@ document.addEventListener('DOMContentLoaded',()=>{ window.DiceGameChannel = DiceGameChannel if (process.env.APP_BUILD_FOR_WINSERVER) { + setTimeout(()=>{ + this.startChannelsGames() + }, 1500) setTimeout(()=>{ Games.startMesh() - Games.startChannelsGames() - }, 5000) + }, 3000) return } @@ -27,6 +29,9 @@ document.addEventListener('DOMContentLoaded',()=>{ window.App.view = view window.Games = Games + setTimeout(()=>{ + this.startChannelsGames() + }, 1500) setTimeout(()=>{ Games.startMesh() }, 3000) diff --git a/src/model/games.js b/src/model/games.js index a9c06ed..ac206e4 100644 --- a/src/model/games.js +++ b/src/model/games.js @@ -48,8 +48,6 @@ class Games { } startMesh(){ - this.startChannelsGames() - let user_id = Eth.Wallet.get().openkey || false this.RTC = new Rtc(user_id)