aboutsummaryrefslogtreecommitdiff
path: root/web/app/controller
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-06-25 17:19:32 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-06-25 17:19:32 +1200
commitd7080b5f3f6cd69930b213f22316014ba841b73a (patch)
tree1c711217ae1a5b8411e9d979386e26d9b34fbfe2 /web/app/controller
parent9b1243d99a3ff450261568e6510e87ae351e95cc (diff)
downloadtraccar-server-d7080b5f3f6cd69930b213f22316014ba841b73a.tar.gz
traccar-server-d7080b5f3f6cd69930b213f22316014ba841b73a.tar.bz2
traccar-server-d7080b5f3f6cd69930b213f22316014ba841b73a.zip
Load devices before websocket updates
Diffstat (limited to 'web/app/controller')
-rw-r--r--web/app/controller/Root.js8
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) {