Fix issues with store commit
This commit is contained in:
parent
fed3adaa88
commit
82107bd1f3
|
@ -57,7 +57,10 @@
|
|||
localStorage?.setItem('travis.auto_signin', 'true')
|
||||
sessionStorage?.setItem('travis.user', JSON.stringify(user))
|
||||
@store.load(Travis.User, user)
|
||||
Travis.User.find(user.id)
|
||||
user = @store.find(Travis.User, user.id)
|
||||
transaction = @store.transaction()
|
||||
transaction.add user
|
||||
user
|
||||
|
||||
receiveMessage: (event) ->
|
||||
if event.origin == @expectedOrigin()
|
||||
|
|
|
@ -23,5 +23,9 @@ require 'travis/model'
|
|||
).property()
|
||||
|
||||
toggle: ->
|
||||
transaction = @get('store').transaction()
|
||||
transaction.add this
|
||||
|
||||
@set 'active', !@get('active')
|
||||
Travis.app.store.commit()
|
||||
|
||||
transaction.commit()
|
||||
|
|
|
@ -14,7 +14,7 @@ require 'travis/model'
|
|||
|
||||
init: ->
|
||||
@poll() if @get('isSyncing')
|
||||
@._super()
|
||||
@_super()
|
||||
|
||||
urlGithub: (->
|
||||
"https://github.com/#{@get('login')}"
|
||||
|
@ -22,7 +22,9 @@ require 'travis/model'
|
|||
|
||||
updateLocale: (locale) ->
|
||||
@setWithSession('locale', locale)
|
||||
Travis.app.store.commit()
|
||||
|
||||
transaction = @get('transaction')
|
||||
transaction.commit()
|
||||
|
||||
type: (->
|
||||
'user'
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user