Port various forgotten fixes from upstream (#1864)
* [Glitch] Fix crash when failing to load emoji picker Port09b322872a
to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com> * [Glitch] Remove duplicate frequently used emojis Portf7c306596f
to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com> Signed-off-by: Claire <claire.github-309c@sitedethib.com> Co-authored-by: Harmon <Harmon758@gmail.com>
This commit is contained in:
parent
1ce75c18e0
commit
dc4e84cebd
2 changed files with 3 additions and 2 deletions
|
@ -345,7 +345,7 @@ class EmojiPickerDropdown extends React.PureComponent {
|
||||||
|
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false, active: false });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,8 @@ const getFrequentlyUsedEmojis = createSelector([
|
||||||
.toArray();
|
.toArray();
|
||||||
|
|
||||||
if (emojis.length < DEFAULTS.length) {
|
if (emojis.length < DEFAULTS.length) {
|
||||||
emojis = emojis.concat(DEFAULTS.slice(0, DEFAULTS.length - emojis.length));
|
let uniqueDefaults = DEFAULTS.filter(emoji => !emojis.includes(emoji));
|
||||||
|
emojis = emojis.concat(uniqueDefaults.slice(0, DEFAULTS.length - emojis.length));
|
||||||
}
|
}
|
||||||
|
|
||||||
return emojis;
|
return emojis;
|
||||||
|
|
Loading…
Reference in a new issue