about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-06-14 18:59:02 +0200
committerGitHub <noreply@github.com>2017-06-14 18:59:02 +0200
commit80c13bf0eff3a64d1b64923c209f82f05410e657 (patch)
tree726a10cdb3624a73cc692a5bc1c5daa74f05a445 /app
parente17c2e5da5010beaefb46c8fffe35e87cb28f407 (diff)
Save settings when they are changed (#3743)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/actions/settings.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/javascript/mastodon/actions/settings.js b/app/javascript/mastodon/actions/settings.js
index 2d260b84c..f9d304c96 100644
--- a/app/javascript/mastodon/actions/settings.js
+++ b/app/javascript/mastodon/actions/settings.js
@@ -3,10 +3,14 @@ import axios from 'axios';
 export const SETTING_CHANGE = 'SETTING_CHANGE';
 
 export function changeSetting(key, value) {
-  return {
-    type: SETTING_CHANGE,
-    key,
-    value,
+  return dispatch => {
+    dispatch({
+      type: SETTING_CHANGE,
+      key,
+      value,
+    });
+
+    dispatch(saveSettings());
   };
 };