mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-14 08:34:26 +02:00
Resolves #764 -- disableLevelInstructions for global mode change
This commit is contained in:
parent
ddb3dc93ca
commit
6df4d93880
5 changed files with 37 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue