Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2421,7 +2421,7 @@ function navigateToMostRecentReport(currentReport: OnyxEntry<Report>) {
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);
Expand All @@ -2430,7 +2430,7 @@ function navigateToMostRecentReport(currentReport: OnyxEntry<Report>) {
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);
}
}
}
Expand Down
44 changes: 23 additions & 21 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? '');
Expand Down Expand Up @@ -227,27 +228,28 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
/>
) : null;

const renderAvatar = isGroupChat ? (
<AvatarWithImagePicker
source={icons[0].source}
isUsingDefaultAvatar={!report.avatarUrl}
size={CONST.AVATAR_SIZE.XLARGE}
avatarStyle={styles.avatarXLarge}
shouldDisableViewPhoto
onImageRemoved={() => {
// 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}
/>
) : (
<RoomHeaderAvatars
icons={icons}
reportID={report?.reportID}
/>
);
const renderAvatar =
isGroupChat && !isThread ? (
<AvatarWithImagePicker
source={icons[0].source}
isUsingDefaultAvatar={!report.avatarUrl}
size={CONST.AVATAR_SIZE.XLARGE}
avatarStyle={styles.avatarXLarge}
shouldDisableViewPhoto
onImageRemoved={() => {
// 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}
/>
) : (
<RoomHeaderAvatars
icons={icons}
reportID={report?.reportID}
/>
);

const reportName =
ReportUtils.isDeprecatedGroupDM(report) || ReportUtils.isGroupChat(report)
Expand Down