Always poll for changes when user is syncing

This commit is contained in:
Piotr Sarnacki 2013-03-29 22:15:19 +01:00
parent da5e028295
commit ce6862e6a0
2 changed files with 6 additions and 2 deletions

View File

@ -13,6 +13,10 @@
Travis.setLocale Travis.default_locale
@set('state', 'signed-out')
@set('user', undefined)
user = Travis.__container__.lookup('controller:currentUser').get('content')
if user.get('stateManager.currentPath') == 'rootState.loaded.updated.uncommitted'
user.send('rollback')
user.unloadRecord()
Travis.__container__.lookup('controller:currentUser').set('content', null)
Travis.__container__.lookup('router:main').send('afterSignOut')

View File

@ -24,8 +24,8 @@ require 'travis/model'
init: ->
@_super()
# TODO: the next line fails, check this
#@poll() if @get('isSyncing')
Ember.run.next this, ->
@poll() if @get('isSyncing')
Ember.run.next this, ->
transaction = @get('store').transaction()