jumbo emoji-only message with whitespace
This commit is contained in:
parent
b6c395fac1
commit
8b5fa7039d
5 changed files with 9 additions and 57 deletions
|
@ -328,9 +328,13 @@ export function getEmojiCount(str: string): number {
|
|||
return count;
|
||||
}
|
||||
|
||||
export function hasNonEmojiText(str: string): boolean {
|
||||
return str.replace(emojiRegex(), '').trim().length > 0;
|
||||
}
|
||||
|
||||
export function getSizeClass(str: string): SizeClassType {
|
||||
// Do we have non-emoji characters?
|
||||
if (str.replace(emojiRegex(), '').trim().length > 0) {
|
||||
if (hasNonEmojiText(str)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue