@@ -9,15 +9,13 @@ import type {OnyxEntry} from 'react-native-onyx';
99import type { ValueOf } from 'type-fest' ;
1010import AvatarWithImagePicker from '@components/AvatarWithImagePicker' ;
1111import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView' ;
12- import DisplayNames from '@components/DisplayNames' ;
1312import HeaderWithBackButton from '@components/HeaderWithBackButton' ;
1413import MentionReportContext from '@components/HTMLEngineProvider/HTMLRenderers/MentionReportRenderer/MentionReportContext' ;
1514import MenuItem from '@components/MenuItem' ;
1615import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription' ;
1716import { ModalActions } from '@components/Modal/Global/ModalContext' ;
1817import OfflineWithFeedback from '@components/OfflineWithFeedback' ;
1918import ParentNavigationSubtitle from '@components/ParentNavigationSubtitle' ;
20- import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback' ;
2119import type { PromotedAction } from '@components/PromotedActionsBar' ;
2220import PromotedActionsBar , { PromotedActions } from '@components/PromotedActionsBar' ;
2321import ReportActionAvatars from '@components/ReportActionAvatars' ;
@@ -72,6 +70,7 @@ import {
7270 getParentNavigationSubtitle ,
7371 getParticipantsAccountIDsForDisplay ,
7472 getParticipantsList ,
73+ getPolicyName ,
7574 getReportDescription ,
7675 getReportFieldKey ,
7776 getReportForHeader ,
@@ -362,10 +361,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata, reportLoading
362361 const shouldParseFullTitle = parentReportAction ?. actionName !== CONST . REPORT . ACTIONS . TYPE . ADD_COMMENT && ! isGroupChat ;
363362 const rawReportName = getReportNameFromReportNameUtils ( reportForHeader , reportAttributes ) ;
364363 const reportName = shouldParseFullTitle ? Parser . htmlToText ( rawReportName ) : rawReportName ;
365- const additionalRoomDetails =
366- ( isPolicyExpenseChat && ! ! report ?. isOwnPolicyExpenseChat ) || isExpenseReportUtil ( report ) || isPolicyExpenseChat || isInvoiceRoom
367- ? chatRoomSubtitle
368- : `${ translate ( 'threads.in' ) } ${ chatRoomSubtitle } ` ;
364+ const additionalRoomDetails = isExpenseReportUtil ( report ) || isPolicyExpenseChat || isInvoiceRoom ? chatRoomSubtitle : `${ translate ( 'threads.in' ) } ${ chatRoomSubtitle } ` ;
369365
370366 let roomDescription : string | undefined ;
371367 if ( caseID === CASES . MONEY_REQUEST ) {
@@ -750,6 +746,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata, reportLoading
750746 return result ;
751747 } , [ canJoin , report , backTo , currentUserPersonalDetails . accountID ] ) ;
752748
749+ const shouldDisplayGroupWorkspaceAsPushRow = ! isThread && ( isGroupChat || isUserCreatedPolicyRoom || isDefaultRoom ) ;
753750 const nameSectionGroupWorkspace = (
754751 < OfflineWithFeedback
755752 pendingAction = { report ?. pendingFields ?. reportName }
@@ -763,10 +760,10 @@ function ReportDetailsPage({policy, report, route, reportMetadata, reportLoading
763760 interactive = { ! shouldDisableRename }
764761 title = { StringUtils . lineBreaksToSpaces ( reportName ) }
765762 titleStyle = { styles . newKansasLarge }
766- titleContainerStyle = { shouldDisableRename && styles . alignItemsCenter }
763+ titleContainerStyle = { ! shouldDisplayGroupWorkspaceAsPushRow && styles . alignItemsCenter }
767764 shouldCheckActionAllowedOnPress = { false }
768- description = { ! shouldDisableRename ? roomDescription : '' }
769- furtherDetails = { chatRoomSubtitle && ! isGroupChat ? additionalRoomDetails : '' }
765+ description = { shouldDisplayGroupWorkspaceAsPushRow ? roomDescription : '' }
766+ furtherDetails = { chatRoomSubtitle && ! isGroupChat && ! shouldDisplayGroupWorkspaceAsPushRow ? additionalRoomDetails : '' }
770767 furtherDetailsNumberOfLines = { isWorkspaceChat ? 0 : undefined }
771768 furtherDetailsStyle = { isWorkspaceChat ? [ styles . textAlignCenter , styles . breakWord ] : undefined }
772769 onPress = { ( ) => {
@@ -775,6 +772,14 @@ function ReportDetailsPage({policy, report, route, reportMetadata, reportLoading
775772 numberOfLinesTitle = { isThread ? 2 : 0 }
776773 shouldBreakWord
777774 />
775+ { shouldDisplayGroupWorkspaceAsPushRow && ! isGroupChat && (
776+ < MenuItemWithTopDescription
777+ shouldShowRightIcon = { false }
778+ interactive = { false }
779+ description = { translate ( 'workspace.common.workspace' ) }
780+ title = { getPolicyName ( { report} ) }
781+ />
782+ ) }
778783 </ View >
779784 </ OfflineWithFeedback >
780785 ) ;
0 commit comments