Add custom emojis to the emoji picker (#5052)
This commit is contained in:
13
app/javascript/mastodon/reducers/custom_emojis.js
Normal file
13
app/javascript/mastodon/reducers/custom_emojis.js
Normal file
@ -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;
|
||||
}
|
||||
};
|
@ -20,6 +20,7 @@ import search from './search';
|
||||
import media_attachments from './media_attachments';
|
||||
import notifications from './notifications';
|
||||
import height_cache from './height_cache';
|
||||
import custom_emojis from './custom_emojis';
|
||||
|
||||
const reducers = {
|
||||
timelines,
|
||||
@ -43,6 +44,7 @@ const reducers = {
|
||||
media_attachments,
|
||||
notifications,
|
||||
height_cache,
|
||||
custom_emojis,
|
||||
};
|
||||
|
||||
export default combineReducers(reducers);
|
||||
|
Reference in New Issue
Block a user