Skip to content

Commit

Permalink
pin transaction thread report by default
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Dec 12, 2023
1 parent 4029eed commit 8cea465
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3076,14 +3076,15 @@ function buildOptimisticChatReport(
parentReportActionID = '',
parentReportID = '',
welcomeMessage = '',
isDefaultPinned = false,
): OptimisticChatReport {
const currentTime = DateUtils.getDBTime();
const isNewlyCreatedWorkspaceChat = chatType === CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT && isOwnPolicyExpenseChat;
return {
type: CONST.REPORT.TYPE.CHAT,
chatType,
isOwnPolicyExpenseChat,
isPinned: reportName === CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS || isNewlyCreatedWorkspaceChat,
isPinned: isDefaultPinned || reportName === CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS || isNewlyCreatedWorkspaceChat,
lastActorAccountID: 0,
lastMessageTranslationKey: '',
lastMessageHtml: '',
Expand Down Expand Up @@ -3336,6 +3337,8 @@ function buildTransactionThread(reportAction: OnyxEntry<ReportAction>, moneyRequ
CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN,
reportAction?.reportActionID,
moneyRequestReportID,
'',
true,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ function ReportActionCompose({
return (
<View style={[shouldShowReportRecipientLocalTime && !lodashGet(network, 'isOffline') && styles.chatItemComposeWithFirstRow, isComposerFullSize && styles.chatItemFullComposeRow]}>
<OfflineWithFeedback pendingAction={pendingAction}>
{shouldShowReportRecipientLocalTime && hasReportRecipient && <ParticipantLocalTime participant={reportRecipient} />}
{/* {shouldShowReportRecipientLocalTime && hasReportRecipient && <ParticipantLocalTime participant={reportRecipient} />} */}
</OfflineWithFeedback>
<View style={isComposerFullSize ? styles.flex1 : {}}>
<PortalHost name="suggestions" />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionItemSingle.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function ReportActionItemSingle(props) {
>{`${status.emojiCode}`}</Text>
</Tooltip>
)}
<ReportActionItemDate created={props.action.created} />
{/* <ReportActionItemDate created={props.action.created} /> */}
</View>
) : null}
<View style={props.hasBeenFlagged ? styles.blockquote : {}}>{props.children}</View>
Expand Down

0 comments on commit 8cea465

Please sign in to comment.