]> cat aescling's git repositories - mastodon.git/blobdiff - app/javascript/mastodon/reducers/compose.js
Add emoji autosuggest (#5053)
[mastodon.git] / app / javascript / mastodon / reducers / compose.js
index 526dbd0c57b80016c4a308dc64e080437c24326f..9d39584fc8a04ab50cf56266fcf2164797abff0b 100644 (file)
@@ -245,7 +245,7 @@ export default function compose(state = initialState, action) {
   case COMPOSE_SUGGESTIONS_CLEAR:
     return state.update('suggestions', ImmutableList(), list => list.clear()).set('suggestion_token', null);
   case COMPOSE_SUGGESTIONS_READY:
-    return state.set('suggestions', ImmutableList(action.accounts.map(item => item.id))).set('suggestion_token', action.token);
+    return state.set('suggestions', ImmutableList(action.accounts ? action.accounts.map(item => item.id) : action.emojis)).set('suggestion_token', action.token);
   case COMPOSE_SUGGESTION_SELECT:
     return insertSuggestion(state, action.position, action.token, action.completion);
   case TIMELINE_DELETE:
This page took 0.027408 seconds and 3 git commands to generate.