Fixed race condition of loading collections.
This commit is contained in:
parent
6767970bab
commit
07677f297c
2 changed files with 5 additions and 5 deletions
|
@ -83,6 +83,10 @@ class App.Auth
|
||||||
for key, value of data.session
|
for key, value of data.session
|
||||||
App.Session.set( key, value )
|
App.Session.set( key, value )
|
||||||
|
|
||||||
|
# refresh default collections
|
||||||
|
for key, value of data.default_collections
|
||||||
|
App[key].refresh( value, options: { clear: true } )
|
||||||
|
|
||||||
App.Event.trigger( 'auth', data.session )
|
App.Event.trigger( 'auth', data.session )
|
||||||
|
|
||||||
# init of i18n
|
# init of i18n
|
||||||
|
@ -93,10 +97,6 @@ class App.Auth
|
||||||
locale = window.navigator.userLanguage || window.navigator.language || 'en'
|
locale = window.navigator.userLanguage || window.navigator.language || 'en'
|
||||||
App.i18n.set( locale )
|
App.i18n.set( locale )
|
||||||
|
|
||||||
# refresh default collections
|
|
||||||
for key, value of data.default_collections
|
|
||||||
App[key].refresh( value, options: { clear: true } )
|
|
||||||
|
|
||||||
App.Event.trigger( 'auth:login', data.session )
|
App.Event.trigger( 'auth:login', data.session )
|
||||||
App.Event.trigger( 'ui:rerender' )
|
App.Event.trigger( 'ui:rerender' )
|
||||||
|
|
||||||
|
|
|
@ -371,7 +371,7 @@ class _taskManagerSingleton extends App.Controller
|
||||||
# reopen tasks
|
# reopen tasks
|
||||||
App.Event.trigger 'taskbar:init'
|
App.Event.trigger 'taskbar:init'
|
||||||
|
|
||||||
task_count = 0
|
task_count = 1
|
||||||
for task in @allTasks
|
for task in @allTasks
|
||||||
task_count += 1
|
task_count += 1
|
||||||
console.log('START', task)
|
console.log('START', task)
|
||||||
|
|
Loading…
Reference in a new issue