From d7080b5f3f6cd69930b213f22316014ba841b73a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 25 Jun 2016 17:19:32 +1200 Subject: Load devices before websocket updates --- web/app/controller/Root.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'web') diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index 56a076edd..da3e3a2a9 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -74,15 +74,19 @@ Ext.define('Traccar.controller.Root', { loadApp: function () { Ext.getStore('Groups').load(); - Ext.getStore('Devices').load(); Ext.getStore('Geofences').load(); + Ext.getStore('Devices').load({ + scope: this, + callback: function () { + this.asyncUpdate(true); + } + }); Ext.get('attribution').remove(); if (this.isPhone) { Ext.create('widget.mainMobile'); } else { Ext.create('widget.main'); } - this.asyncUpdate(true); }, asyncUpdate: function (first) { -- cgit v1.2.3