about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/actions
diff options
context:
space:
mode:
authorcwm <chriswmartin@protonmail.com>2018-01-09 09:48:14 -0600
committercwm <chriswmartin@protonmail.com>2018-01-09 09:48:14 -0600
commit6d1c325167d12300e86d678a054777acd5d3077a (patch)
tree900a6e4024d96da2e5b73540c97dbb772f685c80 /app/javascript/flavours/glitch/actions
parent7f4374d97dd7dce6ec9f632a3cc8527490cbe2c6 (diff)
Rename key to path in actions and reducers for settings (tootsuite pr #6105)
Diffstat (limited to 'app/javascript/flavours/glitch/actions')
-rw-r--r--app/javascript/flavours/glitch/actions/push_notifications/index.js4
-rw-r--r--app/javascript/flavours/glitch/actions/push_notifications/setter.js4
-rw-r--r--app/javascript/flavours/glitch/actions/settings.js6
3 files changed, 7 insertions, 7 deletions
diff --git a/app/javascript/flavours/glitch/actions/push_notifications/index.js b/app/javascript/flavours/glitch/actions/push_notifications/index.js
index 376b55b62..2ffec500a 100644
--- a/app/javascript/flavours/glitch/actions/push_notifications/index.js
+++ b/app/javascript/flavours/glitch/actions/push_notifications/index.js
@@ -15,9 +15,9 @@ export {
   register,
 };
 
-export function changeAlerts(key, value) {
+export function changeAlerts(path, value) {
   return dispatch => {
-    dispatch(setAlerts(key, value));
+    dispatch(setAlerts(path, value));
     dispatch(saveSettings());
   };
 }
diff --git a/app/javascript/flavours/glitch/actions/push_notifications/setter.js b/app/javascript/flavours/glitch/actions/push_notifications/setter.js
index a2cc41c5a..5561766bf 100644
--- a/app/javascript/flavours/glitch/actions/push_notifications/setter.js
+++ b/app/javascript/flavours/glitch/actions/push_notifications/setter.js
@@ -23,11 +23,11 @@ export function clearSubscription () {
   };
 }
 
-export function setAlerts (key, value) {
+export function setAlerts (path, value) {
   return dispatch => {
     dispatch({
       type: SET_ALERTS,
-      key,
+      path,
       value,
     });
   };
diff --git a/app/javascript/flavours/glitch/actions/settings.js b/app/javascript/flavours/glitch/actions/settings.js
index 79adca18c..aeef43527 100644
--- a/app/javascript/flavours/glitch/actions/settings.js
+++ b/app/javascript/flavours/glitch/actions/settings.js
@@ -4,11 +4,11 @@ import { debounce } from 'lodash';
 export const SETTING_CHANGE = 'SETTING_CHANGE';
 export const SETTING_SAVE   = 'SETTING_SAVE';
 
-export function changeSetting(key, value) {
+export function changeSetting(path, value) {
   return dispatch => {
     dispatch({
       type: SETTING_CHANGE,
-      key,
+      path,
       value,
     });
 
@@ -21,7 +21,7 @@ const debouncedSave = debounce((dispatch, getState) => {
     return;
   }
 
-  const data = getState().get('settings').filter((_, key) => key !== 'saved').toJS();
+  const data = getState().get('settings').filter((_, path) => path !== 'saved').toJS();
 
   axios.put('/api/web/settings', { data }).then(() => dispatch({ type: SETTING_SAVE }));
 }, 5000, { trailing: true });