Skip to content

Commit

Permalink
hide preview subtitle for none
Browse files Browse the repository at this point in the history
  • Loading branch information
rojiphil committed Jan 14, 2024
1 parent 3495672 commit 9f37be5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/ReportPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function ReportPreview(props) {
)}
</View>
</View>
{!isScanning && (numberOfRequests > 1 || hasReceipts) && (
{!isScanning && (numberOfRequests > 1 || (hasReceipts && numberOfRequests === 1 && formattedMerchant)) && (
<View style={styles.flexRow}>
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter]}>
<Text style={[styles.textLabelSupporting, styles.textNormal, styles.mb1, styles.lh20]}>{previewSubtitle || moneyRequestComment}</Text>
Expand Down
4 changes: 2 additions & 2 deletions src/libs/TransactionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ function isMerchantMissing(transaction: Transaction) {
}

/**
* Check if the merchant is a partial one `(none)` or `Unknown merchant`
* Check if the merchant is partial i.e. `(none)`
*/
function isPartialMerchant(merchant: string): boolean {
return merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT || merchant === CONST.TRANSACTION.UNKNOWN_MERCHANT;
return merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT;
}

function isAmountMissing(transaction: Transaction) {
Expand Down

0 comments on commit 9f37be5

Please sign in to comment.