Skip to content

Commit

Permalink
fix: disable reoder
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarkhanzadian committed Dec 9, 2024
1 parent 8d70aba commit 7c762ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/mobile/src/components/draggable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -36,6 +37,7 @@ export function Draggable({
onCardPress,
swapCardIndexes,
children,
disableReorder,
}: DraggableProps) {
const ref = useRef<Animated.View>(null);
const theme = useTheme<Theme>();
Expand Down Expand Up @@ -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 (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export function AccountSelectorSheetLayout({
cardId={account.id}
onCardPress={() => onAccountPress(account.id)}
swapCardIndexes={swapAccountIndexes}
//FIXME: disabled until fixed
disableReorder
>
<WalletLoader fingerprint={account.fingerprint} key={account.id}>
{wallet => (
Expand Down

0 comments on commit 7c762ef

Please sign in to comment.