Merge branch 'only-emoji-fix-2' into 'develop'
Big emojis: fix race condition See merge request soapbox-pub/soapbox-fe!593
This commit is contained in:
commit
19ed7b6883
|
@ -91,8 +91,11 @@ class StatusContent extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
setOnlyEmoji = () => {
|
setOnlyEmoji = () => {
|
||||||
if (this.node && this.state.onlyEmoji === undefined) {
|
if (!this.node) return;
|
||||||
this.setState({ onlyEmoji: onlyEmoji(this.node, BIG_EMOJI_LIMIT, true) });
|
const only = onlyEmoji(this.node, BIG_EMOJI_LIMIT, true);
|
||||||
|
|
||||||
|
if (only !== this.state.onlyEmoji) {
|
||||||
|
this.setState({ onlyEmoji: only });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue