Make auto-play GIFs preference affect custom emojis in web UI (#5254)
This commit is contained in:
@ -8,7 +8,7 @@ const initialState = ImmutableList();
|
||||
export default function custom_emojis(state = initialState, action) {
|
||||
switch(action.type) {
|
||||
case STORE_HYDRATE:
|
||||
emojiSearch('', { custom: buildCustomEmojis(action.state.get('custom_emojis', [])) });
|
||||
emojiSearch('', { custom: buildCustomEmojis(action.state.get('custom_emojis', []), action.state.getIn(['meta', 'auto_play_gif'], false)) });
|
||||
return action.state.get('custom_emojis');
|
||||
default:
|
||||
return state;
|
||||
|
@ -58,9 +58,10 @@ const normalizeStatus = (state, status) => {
|
||||
normalStatus.reblog = status.reblog.id;
|
||||
}
|
||||
|
||||
const searchContent = [status.spoiler_text, status.content].join(' ').replace(/<br \/>/g, '\n').replace(/<\/p><p>/g, '\n\n');
|
||||
const searchContent = [status.spoiler_text, status.content].join('\n\n').replace(/<br \/>/g, '\n').replace(/<\/p><p>/g, '\n\n');
|
||||
|
||||
const emojiMap = normalStatus.emojis.reduce((obj, emoji) => {
|
||||
obj[`:${emoji.shortcode}:`] = emoji.static_url;
|
||||
obj[`:${emoji.shortcode}:`] = emoji;
|
||||
return obj;
|
||||
}, {});
|
||||
|
||||
|
Reference in New Issue
Block a user