1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

A lot of updates

This commit is contained in:
Zhiyuan Zheng
2020-12-01 00:44:28 +01:00
parent 0e3528d2cd
commit 9bfee02484
18 changed files with 463 additions and 279 deletions

View File

@ -80,7 +80,7 @@ const Timeline: React.FC<Props> = ({
},
{ previous: true }
),
[disableRefresh]
[disableRefresh, flattenData]
)
const flOnEndReach = useCallback(
() =>
@ -89,7 +89,7 @@ const Timeline: React.FC<Props> = ({
direction: 'next',
id: flattenData[flattenData.length - 1].id
}),
[disableRefresh]
[disableRefresh, flattenData]
)
let content
@ -110,7 +110,7 @@ const Timeline: React.FC<Props> = ({
scrollEnabled={scrollEnabled} // For timeline in Account view
ItemSeparatorComponent={flItemSeparatorComponent}
refreshing={!disableRefresh && isLoading}
onEndReachedThreshold={!disableRefresh ? 0.5 : null}
onEndReachedThreshold={!disableRefresh ? 1 : null}
// require getItemLayout
// {...(flattenPointer[0] && { initialScrollIndex: flattenPointer[0] })}
/>