Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,11 @@ function MoneyReportHeader({
const isMobileSelectionModeEnabled = useMobileSelectionMode();

if (isMobileSelectionModeEnabled) {
// If mobile selection mode is enabled but only one or no transactions remain, turn it off
if (transactions.length <= 1) {
turnOffMobileSelectionMode();
}

return (
<HeaderWithBackButton
title={translate('common.selectMultiple')}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestEditReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function IOURequestEditReport({route}: IOURequestEditReportProps) {

changeTransactionsReport(selectedTransactionIDs, item.value);
clearSelectedTransactions(true);
Navigation.dismissModalWithReport({reportID: item.value});
Navigation.dismissModal();
};

return (
Expand Down
8 changes: 4 additions & 4 deletions src/pages/iou/request/step/IOURequestStepReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ function IOURequestStepReport({route, transaction}: IOURequestStepReportProps) {
const isFromGlobalCreate = !!transaction?.isFromGlobalCreate;
const reportOrDraftReport = getReportOrDraftReport(reportIDFromRoute);

const handleGoBackWithReportID = (id: string) => {
const handleGoBack = () => {
if (isEditing) {
Navigation.dismissModalWithReport({reportID: id});
Navigation.dismissModal();
} else {
Navigation.goBack(backTo);
}
Expand Down Expand Up @@ -88,7 +88,7 @@ function IOURequestStepReport({route, transaction}: IOURequestStepReportProps) {
changeTransactionsReport([transaction.transactionID], item.value);
}

handleGoBackWithReportID(item.value);
handleGoBack();
};

const selectReport = (item: TransactionGroupListItem) => {
Expand All @@ -100,7 +100,7 @@ function IOURequestStepReport({route, transaction}: IOURequestStepReportProps) {

// Early return for same report selection
if (isSameReport) {
handleGoBackWithReportID(item.value);
handleGoBack();
return;
}

Expand Down
Loading