MCPcopy Create free account
hub / github.com/codecombat/codecombat / checkFriends

Method checkFriends

app/views/ladder/LadderTabView.js:98–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96 }
97
98 checkFriends () {
99 return // Skipping for now
100 if (this.checked || (!window.FB) || (!window.gapi)) { return }
101 this.checked = true
102
103 // @addSomethingToLoad('facebook_status')
104
105 this.fbStatusRes = this.supermodel.addSomethingResource('facebook_status', 0)
106 this.fbStatusRes.load()
107
108 FB.getLoginStatus(response => {
109 if (this.destroyed) { return }
110 this.facebookStatus = response.status
111 this.onFacebook = view.facebookStatus === 'connected'
112 if (this.onFacebook) { this.loadFacebookFriends() }
113 return this.fbStatusRes.markLoaded()
114 })
115
116 if (application.gplusHandler.loggedIn === undefined) {
117 this.listenToOnce(application.gplusHandler, 'checked-state', this.gplusSessionStateLoaded)
118 } else {
119 this.gplusSessionStateLoaded()
120 }
121
122 return this.socialNetworkRes.markLoaded()
123 }
124
125 // FACEBOOK
126

Callers

nothing calls this directly

Calls 3

loadFacebookFriendsMethod · 0.95
loadMethod · 0.45

Tested by

no test coverage detected