Skip to content

Commit

Permalink
Merge pull request facebook#24 from zertosh/master
Browse files Browse the repository at this point in the history
Keep use of "ChatConstants" consistent
  • Loading branch information
fisherwebdev committed Aug 12, 2014
2 parents 5fc3915 + ed8b799 commit e2472f8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/flux-chat/js/dispatcher/ChatAppDispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

var ChatConstants = require('../constants/ChatConstants');
var Dispatcher = require('./Dispatcher');

// var merge = require('react/lib/merge');
var copyProperties = require('react/lib/copyProperties');

var PayloadSources = ChatConstants.PayloadSources;

var ChatAppDispatcher = copyProperties(new Dispatcher(), {

/**
Expand All @@ -23,7 +24,7 @@ var ChatAppDispatcher = copyProperties(new Dispatcher(), {
*/
handleServerAction: function(action) {
var payload = {
source: 'SERVER_ACTION',
source: PayloadSources.SERVER_ACTION,
action: action
};
this.dispatch(payload);
Expand All @@ -35,7 +36,7 @@ var ChatAppDispatcher = copyProperties(new Dispatcher(), {
*/
handleViewAction: function(action) {
var payload = {
source: 'VIEW_ACTION',
source: PayloadSources.VIEW_ACTION,
action: action
};
this.dispatch(payload);
Expand Down

0 comments on commit e2472f8

Please sign in to comment.