mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Fixed an ever-reloading bug.
This commit is contained in:
parent
2cdfbf1c48
commit
0df09f7f35
1 changed files with 9 additions and 2 deletions
|
@ -21,10 +21,10 @@ module.exports = class LadderTabView extends CocoView
|
||||||
startsLoading: true
|
startsLoading: true
|
||||||
|
|
||||||
events:
|
events:
|
||||||
'click .connect-facebook': -> FB.login()
|
'click .connect-facebook': 'onConnectFacebook'
|
||||||
|
|
||||||
subscriptions:
|
subscriptions:
|
||||||
'facebook-logged-in': -> location.reload()
|
'facebook-logged-in': 'onConnectedWithFacebook'
|
||||||
|
|
||||||
constructor: (options, @level, @sessions) ->
|
constructor: (options, @level, @sessions) ->
|
||||||
super(options)
|
super(options)
|
||||||
|
@ -32,6 +32,13 @@ module.exports = class LadderTabView extends CocoView
|
||||||
@leaderboards = {}
|
@leaderboards = {}
|
||||||
@refreshLadder()
|
@refreshLadder()
|
||||||
@checkFriends()
|
@checkFriends()
|
||||||
|
|
||||||
|
onConnectFacebook: ->
|
||||||
|
@connecting = true
|
||||||
|
FB.login()
|
||||||
|
|
||||||
|
onConnectedWithFacebook: ->
|
||||||
|
location.reload() if @connecting
|
||||||
|
|
||||||
checkFriends: ->
|
checkFriends: ->
|
||||||
@loadingFriends = true
|
@loadingFriends = true
|
||||||
|
|
Loading…
Reference in a new issue