From 7c762ef198af87ee627e8c8d249ecc236b449031 Mon Sep 17 00:00:00 2001 From: Edgar Khanzadian Date: Mon, 9 Dec 2024 15:41:49 +0400 Subject: [PATCH] fix: disable reoder --- apps/mobile/src/components/draggable.tsx | 4 +++- .../account-selector/account-selector-sheet.layout.tsx | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/mobile/src/components/draggable.tsx b/apps/mobile/src/components/draggable.tsx index 28bd3430e..02bfb5dfc 100644 --- a/apps/mobile/src/components/draggable.tsx +++ b/apps/mobile/src/components/draggable.tsx @@ -24,6 +24,7 @@ interface DraggableProps { onCardPress(cardId: string): void; swapCardIndexes(idx1: number | null, idx2: number | null): void; children: ReactNode; + disableReorder?: boolean; } export function Draggable({ @@ -36,6 +37,7 @@ export function Draggable({ onCardPress, swapCardIndexes, children, + disableReorder, }: DraggableProps) { const ref = useRef(null); const theme = useTheme(); @@ -107,7 +109,7 @@ export function Draggable({ runOnJS(onCardPress)(cardId); }); - const gestures = Gesture.Exclusive(pan, onPress); + const gestures = disableReorder ? onPress : Gesture.Exclusive(pan, onPress); return ( <> diff --git a/apps/mobile/src/features/accounts/account-selector/account-selector-sheet.layout.tsx b/apps/mobile/src/features/accounts/account-selector/account-selector-sheet.layout.tsx index 20588e589..02557cc7e 100644 --- a/apps/mobile/src/features/accounts/account-selector/account-selector-sheet.layout.tsx +++ b/apps/mobile/src/features/accounts/account-selector/account-selector-sheet.layout.tsx @@ -51,6 +51,8 @@ export function AccountSelectorSheetLayout({ cardId={account.id} onCardPress={() => onAccountPress(account.id)} swapCardIndexes={swapAccountIndexes} + //FIXME: disabled until fixed + disableReorder > {wallet => (