mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-07 21:24:26 +02:00
fluxify it
This commit is contained in:
parent
78b87b3c47
commit
de8d8221f5
4 changed files with 34 additions and 8 deletions
|
@ -10,6 +10,7 @@ var ActionTypes = AppConstants.ActionTypes;
|
|||
|
||||
var _isAnimating = false;
|
||||
var _flipTreeY = false;
|
||||
var _numLevelsSolved = 0;
|
||||
|
||||
var GlobalStateStore = assign(
|
||||
{},
|
||||
|
@ -24,6 +25,10 @@ AppConstants.StoreSubscribePrototype,
|
|||
return _flipTreeY;
|
||||
},
|
||||
|
||||
getNumLevelsSolved: function() {
|
||||
return _numLevelsSolved;
|
||||
},
|
||||
|
||||
dispatchToken: AppDispatcher.register(function(payload) {
|
||||
var action = payload.action;
|
||||
var shouldInform = false;
|
||||
|
@ -37,6 +42,10 @@ AppConstants.StoreSubscribePrototype,
|
|||
_flipTreeY = action.flipTreeY;
|
||||
shouldInform = true;
|
||||
break;
|
||||
case ActionTypes.LEVEL_SOLVED:
|
||||
_numLevelsSolved++;
|
||||
shouldInform = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (shouldInform) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue