Skip to content

Commit 2d25aac

Browse files
committed
minor change
1 parent cde1d34 commit 2d25aac

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/components/FloatingActionButton.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ function FloatingActionButton({onPress, onLongPress, isActive, accessibilityLabe
9999
}
100100

101101
hideProductTrainingTooltip();
102+
102103
// Drop focus to avoid blue focus ring.
103104
fabPressable.current?.blur();
104105
onLongPress?.(event);
@@ -127,6 +128,7 @@ function FloatingActionButton({onPress, onLongPress, isActive, accessibilityLabe
127128
style={[
128129
styles.h100,
129130
styles.navigationTabBarItem,
131+
130132
// Prevent text selection on touch devices (e.g. on long press)
131133
canUseTouchScreen() && styles.userSelectNone,
132134
]}

src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,13 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
206206
[quickActionReport?.policyID],
207207
);
208208

209-
const startScanOnLongPress = useCallback(() => {
209+
const startScan = useCallback(() => {
210210
interceptAnonymousUser(() => {
211211
if (shouldRedirectToExpensifyClassic) {
212212
setModalVisible(true);
213213
return;
214214
}
215+
215216
// Start the scan flow directly
216217
startMoneyRequest(CONST.IOU.TYPE.CREATE, generateReportID(), CONST.IOU.REQUEST_TYPE.SCAN, false);
217218
});
@@ -600,7 +601,7 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
600601
isActive={isCreateMenuActive}
601602
ref={fabRef}
602603
onPress={toggleCreateMenu}
603-
onLongPress={startScanOnLongPress}
604+
onLongPress={startScan}
604605
/>
605606
</View>
606607
);

0 commit comments

Comments
 (0)