Skip to content

Commit

Permalink
Merge branch 'main' into fix/39044
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Mar 28, 2024
2 parents 47298d7 + c94be6a commit 4bced49
Show file tree
Hide file tree
Showing 30 changed files with 474 additions and 360 deletions.
141 changes: 0 additions & 141 deletions docs/articles/expensify-classic/workspaces/Domains-Overview.md

This file was deleted.

4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ PODS:
- SDWebImage/Core (~> 5.17)
- SocketRocket (0.6.1)
- Turf (2.7.0)
- VisionCamera (2.16.8):
- VisionCamera (4.0.0-beta.11):
- React
- React-callinvoker
- React-Core
Expand Down Expand Up @@ -1920,7 +1920,7 @@ SPEC CHECKSUMS:
SDWebImageWebPCoder: af09429398d99d524cae2fe00f6f0f6e491ed102
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2
VisionCamera: 0a6794d1974aed5d653d0d0cb900493e2583e35a
VisionCamera: b6b6f46949eae83b71429c971162af337ef34fa3
Yoga: e64aa65de36c0832d04e8c7bd614396c77a80047

PODFILE CHECKSUM: a431c146e1501391834a2f299a74093bac53b530
Expand Down
15 changes: 11 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"react-native-tab-view": "^3.5.2",
"react-native-url-polyfill": "^2.0.0",
"react-native-view-shot": "3.8.0",
"react-native-vision-camera": "2.16.8",
"react-native-vision-camera": "^4.0.0-beta.11",
"react-native-web": "^0.19.9",
"react-native-web-linear-gradient": "^1.1.2",
"react-native-web-sound": "^0.1.3",
Expand Down
22 changes: 0 additions & 22 deletions patches/react-native-vision-camera+2.16.8.patch

This file was deleted.

8 changes: 8 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ const ONYXKEYS = {
/** Contains all the private personal details of the user */
PRIVATE_PERSONAL_DETAILS: 'private_personalDetails',

/**
* PERSONAL_DETAILS_METADATA is a perf optimization used to hold loading states of each entry in PERSONAL_DETAILS_LIST.
* A lot of components are connected to the PERSONAL_DETAILS_LIST entity and do not care about the loading state.
* Setting the loading state directly on the personal details entry caused a lot of unnecessary re-renders.
*/
PERSONAL_DETAILS_METADATA: 'personalDetailsMetadata',

/** Contains all the info for Tasks */
TASK: 'task',

Expand Down Expand Up @@ -549,6 +556,7 @@ type OnyxValuesMapping = {
[ONYXKEYS.INPUT_FOCUSED]: boolean;
[ONYXKEYS.PERSONAL_DETAILS_LIST]: OnyxTypes.PersonalDetailsList;
[ONYXKEYS.PRIVATE_PERSONAL_DETAILS]: OnyxTypes.PrivatePersonalDetails;
[ONYXKEYS.PERSONAL_DETAILS_METADATA]: Record<string, OnyxTypes.PersonalDetailsMetadata>;
[ONYXKEYS.TASK]: OnyxTypes.Task;
[ONYXKEYS.WORKSPACE_RATE_AND_UNIT]: OnyxTypes.WorkspaceRateAndUnit;
[ONYXKEYS.CURRENCY_LIST]: OnyxTypes.CurrencyList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,27 +130,29 @@ function MoneyRequestPreviewContent({
};

const getPreviewHeaderText = (): string => {
if (isDistanceRequest) {
return translate('common.distance');
}

if (isScanning) {
return translate('common.receipt');
}
let message = translate('iou.cash');

if (isBillSplit) {
return translate('iou.split');
if (isDistanceRequest) {
message = translate('common.distance');
} else if (isScanning) {
message = translate('common.receipt');
} else if (isBillSplit) {
message = translate('iou.split');
}

if (isCardTransaction) {
let message = translate('iou.card');
message = translate('iou.card');
if (TransactionUtils.isPending(transaction)) {
message += ` • ${translate('iou.pending')}`;
return message;
}
}

if (isSettled && !iouReport?.isCancelledIOU) {
message += ` • ${getSettledMessage()}`;
return message;
}

let message = translate('iou.cash');
if (shouldShowRBR && transaction) {
const violations = TransactionUtils.getTransactionViolations(transaction.transactionID, transactionViolations);
if (violations?.[0]) {
Expand Down Expand Up @@ -240,9 +242,7 @@ function MoneyRequestPreviewContent({
<View style={styles.expenseAndReportPreviewTextButtonContainer}>
<View style={styles.expenseAndReportPreviewTextContainer}>
<View style={[styles.flexRow]}>
<Text style={[styles.textLabelSupporting, styles.flex1, styles.lh16]}>
{getPreviewHeaderText() + (isSettled && !iouReport?.isCancelledIOU ? ` • ${getSettledMessage()}` : '')}
</Text>
<Text style={[styles.textLabelSupporting, styles.flex1, styles.lh16]}>{getPreviewHeaderText()}</Text>
{!isSettled && shouldShowRBR && (
<Icon
src={Expensicons.DotIndicator}
Expand Down
Loading

0 comments on commit 4bced49

Please sign in to comment.