Resolves #764 -- disableLevelInstructions for global mode change

This commit is contained in:
Peter Cottle 2021-01-11 12:49:28 -07:00
parent ddb3dc93ca
commit 6df4d93880
5 changed files with 37 additions and 0 deletions

View file

@ -9,6 +9,7 @@ var ActionTypes = AppConstants.ActionTypes;
var _isAnimating = false;
var _flipTreeY = false;
var _numLevelsSolved = 0;
var _disableLevelInstructions = false;
var GlobalStateStore = Object.assign(
{},
@ -27,6 +28,10 @@ AppConstants.StoreSubscribePrototype,
return _numLevelsSolved;
},
getShouldDisableLevelInstructions: function() {
return _disableLevelInstructions;
},
dispatchToken: AppDispatcher.register(function(payload) {
var action = payload.action;
var shouldInform = false;
@ -44,6 +49,10 @@ AppConstants.StoreSubscribePrototype,
_numLevelsSolved++;
shouldInform = true;
break;
case ActionTypes.DISABLE_LEVEL_INSTRUCTIONS:
_disableLevelInstructions = true;
shouldInform = true;
break;
}
if (shouldInform) {