0
0
Fork 0

Code-split emoji-mart picker and data (#5175)

This commit is contained in:
Nolan Lawson 2017-10-01 22:22:24 -07:00 committed by Eugen Rochko
parent d841af4e80
commit b9c612b561
7 changed files with 348 additions and 10 deletions

View file

@ -1,6 +1,6 @@
import api from '../api';
import { emojiIndex } from 'emoji-mart';
import { throttle } from 'lodash';
import { search as emojiSearch } from '../emoji_index_light';
import {
updateTimeline,
@ -261,7 +261,7 @@ const fetchComposeSuggestionsAccounts = throttle((dispatch, getState, token) =>
}, 200, { leading: true, trailing: true });
const fetchComposeSuggestionsEmojis = (dispatch, getState, token) => {
const results = emojiIndex.search(token.replace(':', ''), { maxResults: 5 });
const results = emojiSearch(token.replace(':', ''), { maxResults: 5 });
dispatch(readyComposeSuggestionsEmojis(token, results));
};