2014-09-15 16:08:26 +00:00
|
|
|
var ActionTypes = {
|
2014-09-15 22:56:43 +00:00
|
|
|
SETTINGS_UPDATE: "SETTINGS_UPDATE",
|
|
|
|
EVENTLOG_ADD: "EVENTLOG_ADD"
|
2014-09-15 16:08:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
var SettingsActions = {
|
2014-09-17 00:13:37 +00:00
|
|
|
update: function (settings) {
|
2014-09-15 22:56:43 +00:00
|
|
|
settings = _.merge({}, SettingsStore.getAll(), settings);
|
|
|
|
//TODO: Update server.
|
2014-09-15 22:05:06 +00:00
|
|
|
|
2014-09-15 22:56:43 +00:00
|
|
|
//Facebook Flux: We do an optimistic update on the client already.
|
|
|
|
AppDispatcher.dispatchViewAction({
|
|
|
|
actionType: ActionTypes.SETTINGS_UPDATE,
|
|
|
|
settings: settings
|
|
|
|
});
|
|
|
|
}
|
2014-09-16 04:26:16 +00:00
|
|
|
};
|