Skip to content

Commit

Permalink
fixup! Fix Tx List Margins* *Picking the unfavorable route of modifyi…
Browse files Browse the repository at this point in the history
…ng each component's horizontal paddings because of the SceneHeader in the middle of the Animated.FlatList is not yet UI4 compatible
  • Loading branch information
Jon-edge committed Jan 27, 2024
1 parent 887fd83 commit 1d8a933
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions src/components/scenes/TransactionListScene.tsx
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import { asArray } from 'cleaners'
import { EdgeCurrencyWallet, EdgeTokenId, EdgeTokenMap, EdgeTransaction } from 'edge-core-js'
import { asAssetStatus, AssetStatus } from 'edge-info-server/types'
import * as React from 'react'
import { ListRenderItemInfo, RefreshControl } from 'react-native'
import { ListRenderItemInfo, RefreshControl, View } from 'react-native'
import { getVersion } from 'react-native-device-info'
import Animated from 'react-native-reanimated'

@@ -286,25 +286,27 @@ function TransactionListComponent(props: Props) {
backgroundGradientEnd={theme.assetBackgroundGradientEnd}
backgroundGradientStart={theme.assetBackgroundGradientStart}
>
{({ insetStyle }) => (
<Animated.FlatList
// @ts-expect-error
ref={flashListRef}
contentContainerStyle={insetStyle}
data={listItems}
keyboardShouldPersistTaps="handled"
keyExtractor={keyExtractor}
ListEmptyComponent={emptyComponent}
ListHeaderComponent={topArea}
onEndReachedThreshold={0.5}
refreshControl={refreshControl}
renderItem={renderItem}
// TODO: Comment out sticky header indices until we figure out how to
// give the headers a background only when they're sticking.
// stickyHeaderIndices={stickyHeaderIndices}
onEndReached={handleScrollEnd}
onScroll={handleScroll}
/>
{({ insetStyle, undoInsetStyle }) => (
<View style={undoInsetStyle}>
<Animated.FlatList
// @ts-expect-error
ref={flashListRef}
contentContainerStyle={insetStyle}
data={listItems}
keyboardShouldPersistTaps="handled"
keyExtractor={keyExtractor}
ListEmptyComponent={emptyComponent}
ListHeaderComponent={topArea}
onEndReachedThreshold={0.5}
refreshControl={refreshControl}
renderItem={renderItem}
// TODO: Comment out sticky header indices until we figure out how to
// give the headers a background only when they're sticking.
// stickyHeaderIndices={stickyHeaderIndices}
onEndReached={handleScrollEnd}
onScroll={handleScroll}
/>
</View>
)}
</SceneWrapper>
)

0 comments on commit 1d8a933

Please sign in to comment.