Skip to content

Commit

Permalink
fix: last item obscured when limited positions or tokens (#5166)
Browse files Browse the repository at this point in the history
### Description

Adds a minimum height to the `AnimatedSectionList` container styles to
prevent the last item from being obscured.

#### iOS Video (Tabs)


https://github.com/valora-inc/wallet/assets/26950305/3390a615-e367-4dad-9fc5-c516280930b9

#### iOS Video (Drawer)


https://github.com/valora-inc/wallet/assets/26950305/cdcf7694-6180-42ff-937a-838cdba41047

#### Android Video (Tabs)


https://github.com/valora-inc/wallet/assets/26950305/54d78cfd-27de-4577-9396-7198373f308f

#### Android Video (Drawer)


https://github.com/valora-inc/wallet/assets/26950305/f165e3dc-f8a5-47cc-b841-9e92a4b2814f





### Test plan

- Tested locally on iOS
- Tested locally on Android

### Related issues

- Fixes ACT-1116

### Backwards compatibility

Yes

### Network scalability

N/A
  • Loading branch information
MuckT committed Mar 27, 2024
1 parent 56df240 commit 3b780b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tokens/AssetList.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useHeaderHeight } from '@react-navigation/elements'
import React, { useEffect, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import {
Expand Down Expand Up @@ -95,6 +96,7 @@ export default function AssetList({
const dispatch = useDispatch()
const { t } = useTranslation()
const insets = useSafeAreaInsets()
const headerHeight = useHeaderHeight()

const supportedNetworkIds = getSupportedNetworkIdsForTokenBalances()
const tokens = useSelector((state) =>
Expand Down Expand Up @@ -277,6 +279,9 @@ export default function AssetList({
return (
<AnimatedSectionList
contentContainerStyle={[
// TODO (ACT-1133): remove conditional and headerHeight
// Only needed on Android with DrawerTopBar; headerHeight is 0 on iOS
{ minHeight: variables.height + (isWalletTab ? 0 : headerHeight) },
{
paddingBottom: isWalletTab ? 0 : insets.bottom,
opacity: listHeaderHeight > 0 ? 1 : 0,
Expand Down

0 comments on commit 3b780b2

Please sign in to comment.