mirror of https://github.com/tooot-app/app
Merge branch 'main' into candidate
This commit is contained in:
commit
8f1269c350
|
@ -68,7 +68,7 @@ const Sparkline: React.FC<Props> = ({ data, width, height, margin = 0 }) => {
|
||||||
const fillPoints = linePoints.concat(closePolyPoints)
|
const fillPoints = linePoints.concat(closePolyPoints)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Svg height={height} width={width} style={{ marginRight: margin }}>
|
<Svg height={height} width={width} style={{ marginRight: margin }} fill='none'>
|
||||||
<G>
|
<G>
|
||||||
<Path d={'M' + fillPoints.join(' ')} fill={colors.blue} fillOpacity={0.1} />
|
<Path d={'M' + fillPoints.join(' ')} fill={colors.blue} fillOpacity={0.1} />
|
||||||
<Path
|
<Path
|
||||||
|
|
|
@ -145,12 +145,12 @@ const Timeline: React.FC<Props> = ({
|
||||||
ref={customFLRef || flRef}
|
ref={customFLRef || flRef}
|
||||||
scrollEventThrottle={16}
|
scrollEventThrottle={16}
|
||||||
onScroll={onScroll}
|
onScroll={onScroll}
|
||||||
windowSize={7}
|
windowSize={5}
|
||||||
data={flattenPages(data)}
|
data={flattenPages(data)}
|
||||||
{...(customProps?.renderItem
|
{...(customProps?.renderItem
|
||||||
? { renderItem: customProps.renderItem }
|
? { renderItem: customProps.renderItem }
|
||||||
: { renderItem: ({ item }) => <TimelineDefault item={item} queryKey={queryKey} /> })}
|
: { renderItem: ({ item }) => <TimelineDefault item={item} queryKey={queryKey} /> })}
|
||||||
initialNumToRender={6}
|
initialNumToRender={3}
|
||||||
maxToRenderPerBatch={3}
|
maxToRenderPerBatch={3}
|
||||||
onEndReached={() => !disableInfinity && !isFetchingNextPage && fetchNextPage()}
|
onEndReached={() => !disableInfinity && !isFetchingNextPage && fetchNextPage()}
|
||||||
onEndReachedThreshold={0.75}
|
onEndReachedThreshold={0.75}
|
||||||
|
|
|
@ -306,8 +306,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
||||||
return (
|
return (
|
||||||
<FlatList
|
<FlatList
|
||||||
ref={flRef}
|
ref={flRef}
|
||||||
scrollEventThrottle={16}
|
windowSize={5}
|
||||||
windowSize={7}
|
|
||||||
data={query.data?.pages?.[0].body}
|
data={query.data?.pages?.[0].body}
|
||||||
renderItem={({ item, index }) => {
|
renderItem={({ item, index }) => {
|
||||||
const prev = query.data?.pages[0].body[index - 1]?._level || 0
|
const prev = query.data?.pages[0].body[index - 1]?._level || 0
|
||||||
|
@ -334,7 +333,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Svg key={i} style={{ position: 'absolute' }}>
|
<Svg key={i} style={{ position: 'absolute' }} fill='none'>
|
||||||
<Path
|
<Path
|
||||||
d={
|
d={
|
||||||
`M ${curr * StyleConstants.Spacing.S + ARC} ${
|
`M ${curr * StyleConstants.Spacing.S + ARC} ${
|
||||||
|
@ -352,7 +351,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
||||||
} else {
|
} else {
|
||||||
if (i >= curr - 2) return null
|
if (i >= curr - 2) return null
|
||||||
return (
|
return (
|
||||||
<Svg key={i} style={{ position: 'absolute' }}>
|
<Svg key={i} style={{ position: 'absolute' }} fill='none'>
|
||||||
<Path
|
<Path
|
||||||
d={
|
d={
|
||||||
`M ${(i + 1) * StyleConstants.Spacing.S} 0 ` +
|
`M ${(i + 1) * StyleConstants.Spacing.S} 0 ` +
|
||||||
|
@ -373,7 +372,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
||||||
} else {
|
} else {
|
||||||
if (i >= next - 1) {
|
if (i >= next - 1) {
|
||||||
return (
|
return (
|
||||||
<Svg key={i} style={{ position: 'absolute' }}>
|
<Svg key={i} style={{ position: 'absolute' }} fill='none'>
|
||||||
<Path
|
<Path
|
||||||
d={
|
d={
|
||||||
`M ${(i + 1) * StyleConstants.Spacing.S} 0 ` +
|
`M ${(i + 1) * StyleConstants.Spacing.S} 0 ` +
|
||||||
|
@ -393,7 +392,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<Svg key={i} style={{ position: 'absolute' }}>
|
<Svg key={i} style={{ position: 'absolute' }} fill='none'>
|
||||||
<Path
|
<Path
|
||||||
d={`M ${(i + 1) * StyleConstants.Spacing.S} 0 ` + `v 999`}
|
d={`M ${(i + 1) * StyleConstants.Spacing.S} 0 ` + `v 999`}
|
||||||
strokeWidth={1}
|
strokeWidth={1}
|
||||||
|
@ -428,7 +427,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
initialNumToRender={6}
|
initialNumToRender={3}
|
||||||
maxToRenderPerBatch={3}
|
maxToRenderPerBatch={3}
|
||||||
ItemSeparatorComponent={({ leadingItem }) => {
|
ItemSeparatorComponent={({ leadingItem }) => {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue