aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/actions.es6.js
blob: 55cb455248d80989e65fdec9ff654fe0d0a516f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var ActionTypes = {
    SETTINGS_UPDATE: "SETTINGS_UPDATE",
    EVENTLOG_ADD: "EVENTLOG_ADD"
};

var SettingsActions = {
    update(settings) {
        settings = _.merge({}, SettingsStore.getAll(), settings);
        //TODO: Update server.

        //Facebook Flux: We do an optimistic update on the client already.
        AppDispatcher.dispatchViewAction({
            actionType: ActionTypes.SETTINGS_UPDATE,
            settings: settings
        });
    }
};