Skip to content

Commit

Permalink
Merge pull request #44547 from neonbhai/fab-fix
Browse files Browse the repository at this point in the history
Fix: Pay someone quick action text is truncated differently in mweb & Android
  • Loading branch information
MonilBhavsar authored Jul 15, 2024
2 parents 77d95c5 + 1e814a4 commit 39463bd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/PopoverMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import lodashIsEqual from 'lodash/isEqual';
import type {RefObject} from 'react';
import React, {useEffect, useRef, useState} from 'react';
import {View} from 'react-native';
import {StyleSheet, View} from 'react-native';
import type {ModalProps} from 'react-native-modal';
import useArrowKeyFocusManager from '@hooks/useArrowKeyFocusManager';
import useKeyboardShortcut from '@hooks/useKeyboardShortcut';
Expand Down Expand Up @@ -227,7 +227,7 @@ function PopoverMenu({
iconFill={item.iconFill}
contentFit={item.contentFit}
title={item.text}
titleStyle={item.titleStyle}
titleStyle={StyleSheet.flatten([styles.flex1, item.titleStyle])}
shouldCheckActionAllowedOnPress={false}
description={item.description}
numberOfLinesDescription={item.numberOfLinesDescription}
Expand Down
2 changes: 1 addition & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ export default {
splitBill: 'Split expense',
splitScan: 'Split receipt',
splitDistance: 'Split distance',
paySomeone: ({name}: PaySomeoneParams) => `Pay ${name ?? 'someone'}`,
paySomeone: (name: string) => `Pay ${name ?? 'someone'}`,
assignTask: 'Assign task',
header: 'Quick action',
trackManual: 'Track expense',
Expand Down
2 changes: 1 addition & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ export default {
splitBill: 'Dividir gasto',
splitScan: 'Dividir recibo',
splitDistance: 'Dividir distancia',
paySomeone: ({name}: PaySomeoneParams) => `Pagar a ${name ?? 'alguien'}`,
paySomeone: (name: string) => `Pagar a ${name ?? 'alguien'}`,
assignTask: 'Assignar tarea',
header: 'Acción rápida',
trackManual: 'Crear gasto',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function FloatingActionButtonAndPopover(
}
if (quickAction?.action === CONST.QUICK_ACTIONS.SEND_MONEY && quickActionAvatars.length > 0) {
const name: string = ReportUtils.getDisplayNameForParticipant(+(quickActionAvatars[0]?.id ?? -1), true) ?? '';
return translate('quickAction.paySomeone', {name});
return translate('quickAction.paySomeone', name);
}
const titleKey = getQuickActionTitle(quickAction?.action ?? ('' as QuickActionName));
return titleKey ? translate(titleKey) : '';
Expand Down

0 comments on commit 39463bd

Please sign in to comment.