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
2 changes: 1 addition & 1 deletion Mobile-Expensify
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009017104
versionName "9.1.71-4"
versionCode 1009017105
versionName "9.1.71-5"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
1 change: 0 additions & 1 deletion assets/images/plus-minus.svg

This file was deleted.

2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.1.71.4</string>
<string>9.1.71.5</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.1.71</string>
<key>CFBundleVersion</key>
<string>9.1.71.4</string>
<string>9.1.71.5</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/ShareViewController/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.1.71</string>
<key>CFBundleVersion</key>
<string>9.1.71.4</string>
<string>9.1.71.5</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
Expand Down
4 changes: 2 additions & 2 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
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "9.1.71-4",
"version": "9.1.71-5",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
2 changes: 0 additions & 2 deletions src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ import Phone from '@assets/images/phone.svg';
import Pin from '@assets/images/pin.svg';
import Plane from '@assets/images/plane.svg';
import Play from '@assets/images/play.svg';
import PlusMinus from '@assets/images/plus-minus.svg';
import Plus from '@assets/images/plus.svg';
import Printer from '@assets/images/printer.svg';
import Profile from '@assets/images/profile.svg';
Expand Down Expand Up @@ -463,7 +462,6 @@ export {
GalleryNotFound,
Train,
boltSlash,
PlusMinus,
MagnifyingGlassSpyMouthClosed,
EmptySquare,
CheckSquare,
Expand Down
27 changes: 1 addition & 26 deletions src/components/MoneyRequestAmountInput.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved conflicts in this file

Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,6 @@ type MoneyRequestAmountInputProps = {
/** The width of inner content */
contentWidth?: number;

/** Whether the amount is negative */
isNegative?: boolean;

/** Function to toggle the amount to negative */
toggleNegative?: () => void;

/** Function to clear the negative amount */
clearNegative?: () => void;

/** Whether to allow flipping amount */
allowFlippingAmount?: boolean;
/** The testID of the input. Used to locate this view in end-to-end tests. */
testID?: string;
} & Pick<TextInputWithCurrencySymbolProps, 'autoGrowExtraSpace' | 'submitBehavior'>;
Expand Down Expand Up @@ -142,10 +131,6 @@ function MoneyRequestAmountInput(
autoGrow = true,
autoGrowExtraSpace,
contentWidth,
isNegative = false,
allowFlippingAmount = false,
toggleNegative,
clearNegative,
testID,
submitBehavior,
...props
Expand Down Expand Up @@ -179,10 +164,6 @@ function MoneyRequestAmountInput(
*/
const setNewAmount = useCallback(
(newAmount: string) => {
if (allowFlippingAmount && newAmount.startsWith('-') && toggleNegative) {
toggleNegative();
}

// Remove spaces from the newAmount value because Safari on iOS adds spaces when pasting a copied value
// More info: https://github.com/Expensify/App/issues/16974
const newAmountWithoutSpaces = stripSpacesFromAmount(newAmount);
Expand Down Expand Up @@ -211,7 +192,7 @@ function MoneyRequestAmountInput(
return strippedAmount;
});
},
[allowFlippingAmount, decimals, onAmountChange, toggleNegative],
[decimals, onAmountChange],
);

useImperativeHandle(moneyRequestAmountInputRef, () => ({
Expand Down Expand Up @@ -271,11 +252,6 @@ function MoneyRequestAmountInput(
*/
const textInputKeyPress = ({nativeEvent}: NativeSyntheticEvent<KeyboardEvent>) => {
const key = nativeEvent?.key.toLowerCase();

if (!textInput.current?.value && key === 'backspace' && isNegative) {
clearNegative?.();
}

if (isMobileSafari() && key === CONST.PLATFORM_SPECIFIC_KEYS.CTRL.DEFAULT) {
// Optimistically anticipate forward-delete on iOS Safari (in cases where the Mac accessibility keyboard is being
// used for input). If the Control-D shortcut doesn't get sent, the ref will still be reset on the next key press.
Expand Down Expand Up @@ -367,7 +343,6 @@ function MoneyRequestAmountInput(
onMouseDown={handleMouseDown}
onMouseUp={handleMouseUp}
contentWidth={contentWidth}
isNegative={isNegative}
testID={testID}
submitBehavior={submitBehavior}
/>
Expand Down
5 changes: 1 addition & 4 deletions src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import {
isReportInGroupPolicy,
isSettled as isSettledReportUtils,
isTrackExpenseReport,
shouldEnableNegative,
} from '@libs/ReportUtils';
import type {TransactionDetails} from '@libs/ReportUtils';
import {hasEnabledTags} from '@libs/TagsOptionsListUtils';
Expand Down Expand Up @@ -147,8 +146,6 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals
const [transactionBackup] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION_BACKUP}${linkedTransactionID}`, {canBeMissing: true});
const transactionViolations = useTransactionViolations(transaction?.transactionID);

const allowNegativeAmount = shouldEnableNegative(report, policy);

const {
created: transactionDate,
amount: transactionAmount,
Expand All @@ -163,7 +160,7 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals
originalAmount: transactionOriginalAmount,
originalCurrency: transactionOriginalCurrency,
postedDate: transactionPostedDate,
} = useMemo<Partial<TransactionDetails>>(() => getTransactionDetails(transaction, undefined, undefined, allowNegativeAmount) ?? {}, [allowNegativeAmount, transaction]);
} = useMemo<Partial<TransactionDetails>>(() => getTransactionDetails(transaction) ?? {}, [transaction]);
const isEmptyMerchant = transactionMerchant === '' || transactionMerchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT;
const isDistanceRequest = isDistanceRequestTransactionUtils(transaction);
const isPerDiemRequest = isPerDiemRequestTransactionUtils(transaction);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import type {NativeSyntheticEvent, TextInputSelectionChangeEventData} from 'react-native';
import AmountTextInput from '@components/AmountTextInput';
import CurrencySymbolButton from '@components/CurrencySymbolButton';
import Text from '@components/Text';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import {getLocalizedCurrencySymbol} from '@libs/CurrencyUtils';
Expand All @@ -23,7 +22,6 @@ function BaseTextInputWithCurrencySymbol(
isCurrencyPressable = true,
hideCurrencySymbol = false,
extraSymbol,
isNegative = false,
style,
...rest
}: BaseTextInputWithCurrencySymbolProps,
Expand All @@ -43,11 +41,8 @@ function BaseTextInputWithCurrencySymbol(
onChangeAmount(newAmount);
};

const negativeSymbol = <Text style={[styles.iouAmountText]}>-</Text>;

return (
<>
{isNegative && negativeSymbol}
{!hideCurrencySymbol && (
<CurrencySymbolButton
currencySymbol={currencySymbol ?? ''}
Expand Down
3 changes: 0 additions & 3 deletions src/components/TextInputWithCurrencySymbol/types.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved conflicts in this file

Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ type BaseTextInputWithCurrencySymbolProps = {
/** Hide the focus styles on TextInput */
hideFocusedState?: boolean;

/** Whether the amount is negative */
isNegative?: boolean;

/** The test ID of TextInput. Used to locate the view in end-to-end tests. */
testID?: string;
} & Pick<BaseTextInputProps, 'autoFocus' | 'autoGrow' | 'autoGrowExtraSpace' | 'contentWidth' | 'onPress' | 'submitBehavior'>;
Expand Down
1 change: 0 additions & 1 deletion src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,6 @@ const translations = {
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Zahle ${formattedAmount} anderswo` : `Anderswo bezahlen`),
nextStep: 'Nächste Schritte',
finished: 'Fertiggestellt',
flip: 'Umkehren',
sendInvoice: ({amount}: RequestAmountParams) => `Sende ${amount} Rechnung`,
submitAmount: ({amount}: RequestAmountParams) => `Einreichen ${amount}`,
expenseAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `${formattedAmount}${comment ? `für ${comment}` : ''}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,6 @@ const translations = {
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pay ${formattedAmount} elsewhere` : `Pay elsewhere`),
nextStep: 'Next steps',
finished: 'Finished',
flip: 'Flip',
sendInvoice: ({amount}: RequestAmountParams) => `Send ${amount} invoice`,
submitAmount: ({amount}: RequestAmountParams) => `Submit ${amount}`,
expenseAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `${formattedAmount}${comment ? ` for ${comment}` : ''}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,6 @@ const translations = {
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pagar ${formattedAmount} de otra forma` : `Pagar de otra forma`),
nextStep: 'Pasos siguientes',
finished: 'Finalizado',
flip: 'Cambiar',
sendInvoice: ({amount}: RequestAmountParams) => `Enviar factura de ${amount}`,
submitAmount: ({amount}: RequestAmountParams) => `Solicitar ${amount}`,
expenseAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `${formattedAmount}${comment ? ` para ${comment}` : ''}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,6 @@ const translations = {
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Payer ${formattedAmount} ailleurs` : `Payer ailleurs`),
nextStep: 'Étapes suivantes',
finished: 'Terminé',
flip: 'Inverser',
sendInvoice: ({amount}: RequestAmountParams) => `Envoyer une facture de ${amount}`,
submitAmount: ({amount}: RequestAmountParams) => `Soumettre ${amount}`,
expenseAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `${formattedAmount}${comment ? `pour ${comment}` : ''}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,6 @@ const translations = {
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Paga ${formattedAmount} altrove` : `Paga altrove`),
nextStep: 'Prossimi passi',
finished: 'Finito',
flip: 'Inverti',
sendInvoice: ({amount}: RequestAmountParams) => `Invia fattura di ${amount}`,
submitAmount: ({amount}: RequestAmountParams) => `Invia ${amount}`,
expenseAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `${formattedAmount}${comment ? `per ${comment}` : ''}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,6 @@ const translations = {
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `他の場所で${formattedAmount}を支払う` : `他の場所で支払う`),
nextStep: '次のステップ',
finished: '完了',
flip: '反転',
sendInvoice: ({amount}: RequestAmountParams) => `${amount} 請求書を送信`,
submitAmount: ({amount}: RequestAmountParams) => `${amount}を提出`,
expenseAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `${formattedAmount}${comment ? `${comment} のために` : ''}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,6 @@ const translations = {
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Betaal ${formattedAmount} ergens anders` : `Elders betalen`),
nextStep: 'Volgende stappen',
finished: 'Voltooid',
flip: 'Omdraaien',
sendInvoice: ({amount}: RequestAmountParams) => `Verstuur ${amount} factuur`,
submitAmount: ({amount}: RequestAmountParams) => `Verstuur ${amount}`,
expenseAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `${formattedAmount}${comment ? `voor ${comment}` : ''}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,6 @@ const translations = {
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Zapłać ${formattedAmount} gdzie indziej` : `Zapłać gdzie indziej`),
nextStep: 'Następne kroki',
finished: 'Zakończono',
flip: 'Odwróć',
sendInvoice: ({amount}: RequestAmountParams) => `Wyślij fakturę na kwotę ${amount}`,
submitAmount: ({amount}: RequestAmountParams) => `Zatwierdź ${amount}`,
expenseAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `${formattedAmount}${comment ? `dla ${comment}` : ''}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,6 @@ const translations = {
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pague ${formattedAmount} em outro lugar` : `Pague em outro lugar`),
nextStep: 'Próximos passos',
finished: 'Concluído',
flip: 'Inverter',
sendInvoice: ({amount}: RequestAmountParams) => `Enviar fatura de ${amount}`,
submitAmount: ({amount}: RequestAmountParams) => `Enviar ${amount}`,
expenseAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `${formattedAmount}${comment ? `para ${comment}` : ''}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,6 @@ const translations = {
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `在其他地方支付${formattedAmount}` : `在其他地方支付`),
nextStep: '下一步',
finished: '完成',
flip: '翻转',
sendInvoice: ({amount}: RequestAmountParams) => `发送 ${amount} 发票`,
submitAmount: ({amount}: RequestAmountParams) => `提交 ${amount}`,
expenseAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `${formattedAmount}${comment ? `对于${comment}` : ''}`,
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ModifiedExpenseMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function getForReportAction({
if (hasModifiedAmount) {
const oldCurrency = reportActionOriginalMessage?.oldCurrency;
const oldAmountValue = reportActionOriginalMessage?.oldAmount ?? 0;
const oldAmount = oldAmountValue ? convertToDisplayString(reportActionOriginalMessage?.oldAmount ?? 0, oldCurrency) : '';
const oldAmount = oldAmountValue > 0 ? convertToDisplayString(reportActionOriginalMessage?.oldAmount ?? 0, oldCurrency) : '';

const currency = reportActionOriginalMessage?.currency;
const amount = convertToDisplayString(reportActionOriginalMessage?.amount ?? 0, currency);
Expand Down
Loading