Skip to content

Commit

Permalink
Merge pull request #51380 from bernhardoj/fix/50306-emoji-is-cut-off-…
Browse files Browse the repository at this point in the history
…when-contains-mention

Fix emoji is cut off when the message has emoji and mention only
  • Loading branch information
youssef-lr authored Oct 30, 2024
2 parents 8bfb4a3 + 298ec36 commit 084b104
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/home/report/comment/TextCommentFragment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import convertToLTR from '@libs/convertToLTR';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
import * as EmojiUtils from '@libs/EmojiUtils';
import Performance from '@libs/Performance';
import * as ReportActionsUtils from '@libs/ReportActionsUtils';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import type {OriginalMessageSource} from '@src/types/onyx/OriginalMessage';
Expand Down Expand Up @@ -45,7 +46,8 @@ type TextCommentFragmentProps = {
function TextCommentFragment({fragment, styleAsDeleted, styleAsMuted = false, source, style, displayAsGroup, iouMessage = ''}: TextCommentFragmentProps) {
const theme = useTheme();
const styles = useThemeStyles();
const {html = '', text} = fragment ?? {};
const {html = ''} = fragment ?? {};
const text = ReportActionsUtils.getTextFromHtml(html);
const {translate} = useLocalize();
const {shouldUseNarrowLayout} = useResponsiveLayout();

Expand Down

0 comments on commit 084b104

Please sign in to comment.