about summary refs log tree commit diff
path: root/app/javascript/mastodon/reducers/custom_emojis.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-23 05:40:28 +0200
committerGitHub <noreply@github.com>2017-09-23 05:40:28 +0200
commit66126f302167d21e4bf247e660f595ff0beaaf20 (patch)
treec63eb3ba86ec37d2a0a7fd0f39e62a1c86f785d3 /app/javascript/mastodon/reducers/custom_emojis.js
parent293972f716476933df2b665ad755cafe4d29d82d (diff)
Add custom emojis to the emoji picker (#5052)
Diffstat (limited to 'app/javascript/mastodon/reducers/custom_emojis.js')
-rw-r--r--app/javascript/mastodon/reducers/custom_emojis.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/custom_emojis.js b/app/javascript/mastodon/reducers/custom_emojis.js
new file mode 100644
index 000000000..15bba7bcc
--- /dev/null
+++ b/app/javascript/mastodon/reducers/custom_emojis.js
@@ -0,0 +1,13 @@
+import { List as ImmutableList } from 'immutable';
+import { STORE_HYDRATE } from '../actions/store';
+
+const initialState = ImmutableList();
+
+export default function statuses(state = initialState, action) {
+  switch(action.type) {
+  case STORE_HYDRATE:
+    return action.state.get('custom_emojis');
+  default:
+    return state;
+  }
+};