Skip to content

Commit

Permalink
Merge pull request #54100 from bernhardoj/fix/53697-context-menu-does…
Browse files Browse the repository at this point in the history
…nt-show-when-long-press-empty-receipt
  • Loading branch information
blimpich authored Dec 16, 2024
2 parents 78c9b74 + 016f668 commit 9db2134
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/components/ReceiptEmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ type ReceiptEmptyStateProps = {
};

// Returns an SVG icon indicating that the user should attach a receipt
function ReceiptEmptyState({hasError = false, onPress = () => {}, disabled = false, isThumbnail = false}: ReceiptEmptyStateProps) {
function ReceiptEmptyState({hasError = false, onPress, disabled = false, isThumbnail = false}: ReceiptEmptyStateProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const theme = useTheme();

const Wrapper = onPress ? PressableWithoutFeedback : View;

return (
<PressableWithoutFeedback
<Wrapper
accessibilityRole="imagebutton"
accessibilityLabel={translate('receipt.upload')}
onPress={onPress}
Expand Down Expand Up @@ -57,7 +59,7 @@ function ReceiptEmptyState({hasError = false, onPress = () => {}, disabled = fal
/>
)}
</View>
</PressableWithoutFeedback>
</Wrapper>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ function MoneyRequestPreviewContent({
images={receiptImages}
isHovered={isHovered || isScanning}
size={1}
onPress={shouldDisableOnPress ? undefined : onPreviewPressed}
/>
{isEmptyObject(transaction) && !ReportActionsUtils.isMessageDeleted(action) && action.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? (
<MoneyRequestSkeletonView />
Expand Down
1 change: 0 additions & 1 deletion src/components/ReportActionItem/ReportPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ function ReportPreview({
images={lastThreeReceipts}
total={allTransactions.length}
size={CONST.RECEIPT.MAX_REPORT_PREVIEW_RECEIPTS}
onPress={openReportFromPreview}
/>
<View style={[styles.expenseAndReportPreviewBoxBody, hasReceipts ? styles.mtn1 : {}]}>
<View style={shouldShowSettlementButton ? {} : styles.expenseAndReportPreviewTextButtonContainer}>
Expand Down

0 comments on commit 9db2134

Please sign in to comment.