diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-06-25 17:19:32 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-06-25 17:19:32 +1200 |
commit | d7080b5f3f6cd69930b213f22316014ba841b73a (patch) | |
tree | 1c711217ae1a5b8411e9d979386e26d9b34fbfe2 | |
parent | 9b1243d99a3ff450261568e6510e87ae351e95cc (diff) | |
download | trackermap-server-d7080b5f3f6cd69930b213f22316014ba841b73a.tar.gz trackermap-server-d7080b5f3f6cd69930b213f22316014ba841b73a.tar.bz2 trackermap-server-d7080b5f3f6cd69930b213f22316014ba841b73a.zip |
Load devices before websocket updates
-rw-r--r-- | web/app/controller/Root.js | 8 |
1 files changed, 6 insertions, 2 deletions
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) { |