jumbo emoji-only message with whitespace
This commit is contained in:
parent
b6c395fac1
commit
8b5fa7039d
5 changed files with 9 additions and 57 deletions
|
@ -1,8 +1,7 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { getEmojiCount } from '../components/emoji/lib';
|
||||
import { isEmojiOnlyText } from './isEmojiOnlyText';
|
||||
import { getEmojiCount, hasNonEmojiText } from '../components/emoji/lib';
|
||||
|
||||
type FontSizes = {
|
||||
diameter: number;
|
||||
|
@ -33,7 +32,7 @@ export function getFittedFontSize(
|
|||
const sizes = getFontSizes(bubbleSize);
|
||||
|
||||
let candidateFontSize = sizes.text;
|
||||
if (isEmojiOnlyText(text) && getEmojiCount(text) === 1) {
|
||||
if (!hasNonEmojiText(text) && getEmojiCount(text) === 1) {
|
||||
candidateFontSize = sizes.singleEmoji;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue