mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 04:36:46 +00:00
jumbo emoji-only message with whitespace
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user