diff options
Diffstat (limited to 'app/javascript/mastodon/reducers/custom_emojis.js')
-rw-r--r-- | app/javascript/mastodon/reducers/custom_emojis.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/mastodon/reducers/custom_emojis.js b/app/javascript/mastodon/reducers/custom_emojis.js index 15bba7bcc..d80c0d156 100644 --- a/app/javascript/mastodon/reducers/custom_emojis.js +++ b/app/javascript/mastodon/reducers/custom_emojis.js @@ -1,11 +1,14 @@ import { List as ImmutableList } from 'immutable'; import { STORE_HYDRATE } from '../actions/store'; +import { emojiIndex } from 'emoji-mart'; +import { buildCustomEmojis } from '../emoji'; const initialState = ImmutableList(); -export default function statuses(state = initialState, action) { +export default function custom_emojis(state = initialState, action) { switch(action.type) { case STORE_HYDRATE: + emojiIndex.search('', { custom: buildCustomEmojis(action.state.get('custom_emojis', [])) }); return action.state.get('custom_emojis'); default: return state; |