mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
FIX: Scroll on multi sig creation
This commit is contained in:
parent
b935dbca32
commit
b16d5b645f
@ -36,14 +36,16 @@ const DrawerList = props => {
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [wallets, pendingWallets]);
|
||||
|
||||
useEffect(() => {
|
||||
if (walletsCount.current < wallets.length) {
|
||||
walletsCarousel.current?.snapToItem(walletsCount.current);
|
||||
}
|
||||
walletsCount.current = wallets.length;
|
||||
}, [wallets]);
|
||||
|
||||
useEffect(() => {
|
||||
if (pendingWallets.length > 0) {
|
||||
walletsCarousel.current?.snapToItem(carouselData.length - pendingWallets.length);
|
||||
} else {
|
||||
if (walletsCount.current <= wallets.length) {
|
||||
walletsCarousel.current?.snapToItem(walletsCount.current - 1);
|
||||
walletsCount.current = wallets.length;
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [pendingWallets]);
|
||||
|
@ -89,14 +89,16 @@ const WalletsList = () => {
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [wallets, pendingWallets]);
|
||||
|
||||
useEffect(() => {
|
||||
if (walletsCount.current < wallets.length) {
|
||||
walletsCarousel.current?.snapToItem(walletsCount.current);
|
||||
}
|
||||
walletsCount.current = wallets.length;
|
||||
}, [wallets]);
|
||||
|
||||
useEffect(() => {
|
||||
if (pendingWallets.length > 0) {
|
||||
walletsCarousel.current?.snapToItem(carouselData.length - pendingWallets.length);
|
||||
} else {
|
||||
if (walletsCount.current <= wallets.length) {
|
||||
walletsCarousel.current?.snapToItem(walletsCount.current - 1);
|
||||
walletsCount.current = wallets.length;
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [pendingWallets]);
|
||||
|
Loading…
Reference in New Issue
Block a user