diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index a4afff17d972..35de6c9ea1f9 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -2421,7 +2421,7 @@ function navigateToMostRecentReport(currentReport: OnyxEntry) { if (!isChatThread) { Navigation.goBack(); } - Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID ?? '')); + Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID ?? ''), CONST.NAVIGATION.TYPE.FORCED_UP); } else { const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE]); const chat = ReportUtils.getChatByParticipants(participantAccountIDs); @@ -2430,7 +2430,7 @@ function navigateToMostRecentReport(currentReport: OnyxEntry) { if (!isChatThread) { Navigation.goBack(); } - Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat?.reportID)); + Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat?.reportID), CONST.NAVIGATION.TYPE.FORCED_UP); } } } diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index bc55511cee71..3a7f4ad6f28d 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -82,6 +82,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD const chatRoomSubtitle = useMemo(() => ReportUtils.getChatRoomSubtitle(report), [report, policy]); const parentNavigationSubtitleData = ReportUtils.getParentNavigationSubtitle(report); const isGroupChat = useMemo(() => ReportUtils.isGroupChat(report), [report]); + const isThread = useMemo(() => ReportUtils.isThread(report), [report]); const participants = useMemo(() => { if (isGroupChat) { return ReportUtils.getParticipantAccountIDs(report.reportID ?? ''); @@ -227,27 +228,28 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD /> ) : null; - const renderAvatar = isGroupChat ? ( - { - // Calling this without a file will remove the avatar - Report.updateGroupChatAvatar(report.reportID ?? ''); - }} - onImageSelected={(file) => Report.updateGroupChatAvatar(report.reportID ?? '', file)} - editIcon={Expensicons.Camera} - editIconStyle={styles.smallEditIconAccount} - /> - ) : ( - - ); + const renderAvatar = + isGroupChat && !isThread ? ( + { + // Calling this without a file will remove the avatar + Report.updateGroupChatAvatar(report.reportID ?? ''); + }} + onImageSelected={(file) => Report.updateGroupChatAvatar(report.reportID ?? '', file)} + editIcon={Expensicons.Camera} + editIconStyle={styles.smallEditIconAccount} + /> + ) : ( + + ); const reportName = ReportUtils.isDeprecatedGroupDM(report) || ReportUtils.isGroupChat(report)