diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 6fd36e42684a..f7b2134d2436 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -819,7 +819,8 @@ function getActionableMentionWhisperMessage(reportAction: OnyxEntry { const personalDetail = personalDetails.find((personal) => personal.accountID === accountID); - const handleText = PersonalDetailsUtils.getEffectiveDisplayName(personalDetail) ?? Localize.translateLocal('common.hidden'); + const displayName = PersonalDetailsUtils.getEffectiveDisplayName(personalDetail); + const handleText = _.isEmpty(displayName) ? Localize.translateLocal('common.hidden') : displayName; return `@${handleText}`; }); const preMentionsText = 'Heads up, '; diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 2b9e868c5e09..f7c26ede33d5 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -297,6 +297,8 @@ function ReportActionItem(props) { [props.draftMessage, props.action, props.report.reportID, toggleContextMenuFromActiveReportAction, originalReport, originalReportID], ); + // Handles manual scrolling to the bottom of the chat when the last message is an actionable mention whisper and it's resolved. + // This fixes an issue where InvertedFlatList fails to auto scroll down and results in an empty space at the bottom of the chat in IOS. useEffect(() => { if (props.index !== 0 || !ReportActionsUtils.isActionableMentionWhisper(props.action)) { return;