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

Function toggleSound

app/core/store/modules/layoutChrome.js:18–25  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

16
17 mutations: {
18 toggleSound (state) {
19 state.soundOn = !state.soundOn
20
21 // Also propagate this update to older Backbone/User volume settings
22 me.set('volume', state.soundOn ? 1 : 0)
23 me.patch()
24 Backbone.Mediator.publish('level:set-volume', { volume: me.get('volume') })
25 },
26
27 setUnitMapUrlDetails (state, payload) {
28 Vue.set(state, 'currentCourseId', payload.courseId)

Callers

nothing calls this directly

Calls 4

patchMethod · 0.80
publishMethod · 0.80
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected