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

Function updateUserCreditsMessage

app/lib/user-utils.js:181–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179}
180
181function updateUserCreditsMessage () {
182 if (globalVar.fetchingCreditsString) return
183
184 globalVar.fetchingCreditsString = true
185 levelChatCreditsString().then(msg => {
186 if (msg !== globalVar.userCreditsMessage) {
187 globalVar.userCreditsMessage = msg
188 Backbone.Mediator.publish('auth:user-credits-message-updates', {})
189 }
190 globalVar.fetchingCreditsString = false
191 })
192}
193function hasSeenParentBuyingforSelfPrompt () {
194 return !!localStorage.load(parentBuyingforSelfPromptKey())
195}

Callers

nothing calls this directly

Calls 2

levelChatCreditsStringFunction · 0.85
publishMethod · 0.80

Tested by

no test coverage detected