Rm unused
This commit is contained in:
@@ -34,10 +34,10 @@ function ListImpl<ItemT>(
|
|||||||
desktopFixedHeight, // TODO
|
desktopFixedHeight, // TODO
|
||||||
headerOffset,
|
headerOffset,
|
||||||
keyExtractor,
|
keyExtractor,
|
||||||
refreshing,
|
refreshing: _unsupportedRefreshing,
|
||||||
onEndReached,
|
onEndReached,
|
||||||
onEndReachedThreshold,
|
onEndReachedThreshold,
|
||||||
onRefresh,
|
onRefresh: _unsupportedOnRefresh,
|
||||||
onScrolledDownChange, // TODO
|
onScrolledDownChange, // TODO
|
||||||
renderItem,
|
renderItem,
|
||||||
extraData,
|
extraData,
|
||||||
@@ -55,7 +55,7 @@ function ListImpl<ItemT>(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
let header = null
|
let header: ListProps<ItemT>['ListHeaderComponent'] = null
|
||||||
if (ListHeaderComponent != null) {
|
if (ListHeaderComponent != null) {
|
||||||
if (typeof ListHeaderComponent === 'object') {
|
if (typeof ListHeaderComponent === 'object') {
|
||||||
header = ListHeaderComponent
|
header = ListHeaderComponent
|
||||||
@@ -65,7 +65,7 @@ function ListImpl<ItemT>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let footer = null
|
let footer: ListProps<ItemT>['ListHeaderComponent'] = null
|
||||||
if (ListFooterComponent != null) {
|
if (ListFooterComponent != null) {
|
||||||
if (typeof ListFooterComponent === 'object') {
|
if (typeof ListFooterComponent === 'object') {
|
||||||
footer = ListFooterComponent
|
footer = ListFooterComponent
|
||||||
@@ -75,20 +75,6 @@ function ListImpl<ItemT>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This doesn't work when refreshing is true. Is it supposed to?'
|
|
||||||
let refreshControl
|
|
||||||
if (refreshing !== undefined || onRefresh !== undefined) {
|
|
||||||
refreshControl = (
|
|
||||||
<RefreshControl
|
|
||||||
refreshing={refreshing ?? false}
|
|
||||||
onRefresh={onRefresh}
|
|
||||||
tintColor={pal.colors.text}
|
|
||||||
titleColor={pal.colors.text}
|
|
||||||
progressViewOffset={headerOffset}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (headerOffset != null) {
|
if (headerOffset != null) {
|
||||||
style = addStyle(style, {
|
style = addStyle(style, {
|
||||||
paddingTop: headerOffset,
|
paddingTop: headerOffset,
|
||||||
@@ -146,7 +132,6 @@ function ListImpl<ItemT>(
|
|||||||
desktopFixedHeight ? styles.minHeightViewport : null,
|
desktopFixedHeight ? styles.minHeightViewport : null,
|
||||||
pal.border,
|
pal.border,
|
||||||
]}>
|
]}>
|
||||||
{refreshControl}
|
|
||||||
{header}
|
{header}
|
||||||
{(data as Array<ItemT>).map((item, index) => (
|
{(data as Array<ItemT>).map((item, index) => (
|
||||||
<Row<ItemT>
|
<Row<ItemT>
|
||||||
|
|||||||
Reference in New Issue
Block a user