Minor performance optimization to speed up app boot

pull/605/head
Thibaut Courouble 8 years ago
parent 067fa9355e
commit d59d43e64b

@ -105,8 +105,10 @@
@trigger 'ready'
@router.start()
@hideLoading()
@welcomeBack() unless @doc
@removeEvent 'ready bootError'
setTimeout =>
@welcomeBack() unless @doc
@removeEvent 'ready bootError'
, 50
return
initDoc: (doc) ->

@ -5,7 +5,7 @@ class app.UpdateChecker
$.on window, 'focus', @checkForUpdate
app.appCache.on 'updateready', @onUpdateReady if app.appCache
@checkDocs()
setTimeout @checkDocs, 0
check: ->
if app.appCache
@ -21,7 +21,7 @@ class app.UpdateChecker
new app.views.Notif 'UpdateReady', autoHide: null
return
checkDocs: ->
checkDocs: =>
unless app.settings.get('manualUpdate')
app.docs.updateInBackground()
else

@ -135,7 +135,8 @@ class app.views.Search extends app.View
afterRoute: (name, context) =>
@delay @searchUrl if context.hash
@autoFocus()
@delay @autoFocus
return
extractHashValue: ->
if (value = @getHashValue())?

Loading…
Cancel
Save