1
0
mirror of https://github.com/tooot-app/app synced 2024-12-29 10:51:06 +01:00

Temp remove lookback component

This commit is contained in:
Zhiyuan Zheng 2022-01-31 12:32:19 +01:00
parent 46bd9186fa
commit d08c1bf7ac
2 changed files with 2 additions and 28 deletions

View File

@ -1,9 +1,7 @@
import analytics from '@components/analytics' import analytics from '@components/analytics'
import { HeaderCenter, HeaderRight } from '@components/Header' import { HeaderCenter, HeaderRight } from '@components/Header'
import ComponentSeparator from '@components/Separator'
import Timeline from '@components/Timeline' import Timeline from '@components/Timeline'
import TimelineDefault from '@components/Timeline/Default' import TimelineDefault from '@components/Timeline/Default'
import TimelineLookback from '@components/Timeline/Lookback'
import { createNativeStackNavigator } from '@react-navigation/native-stack' import { createNativeStackNavigator } from '@react-navigation/native-stack'
import { import {
ScreenTabsScreenProps, ScreenTabsScreenProps,
@ -11,7 +9,6 @@ import {
} from '@utils/navigation/navigators' } from '@utils/navigation/navigators'
import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
import { getInstanceTimelinesLookback } from '@utils/slices/instancesSlice' import { getInstanceTimelinesLookback } from '@utils/slices/instancesSlice'
import { StyleConstants } from '@utils/styles/constants'
import React, { useCallback, useMemo } from 'react' import React, { useCallback, useMemo } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { Platform } from 'react-native' import { Platform } from 'react-native'
@ -55,17 +52,7 @@ const TabLocal = React.memo(
const queryKey: QueryKeyTimeline = ['Timeline', { page: 'Following' }] const queryKey: QueryKeyTimeline = ['Timeline', { page: 'Following' }]
const renderItem = useCallback(({ item }) => { const renderItem = useCallback(({ item }) => {
if (timelinesLookback?.['Following']?.ids?.[0] === item.id) { if (timelinesLookback?.['Following']?.ids?.[0] === item.id) {
return ( return <TimelineDefault item={item} queryKey={queryKey} />
<>
<TimelineLookback />
<ComponentSeparator
extraMarginLeft={
StyleConstants.Avatar.M + StyleConstants.Spacing.S
}
/>
<TimelineDefault item={item} queryKey={queryKey} />
</>
)
} }
return <TimelineDefault item={item} queryKey={queryKey} /> return <TimelineDefault item={item} queryKey={queryKey} />
}, []) }, [])

View File

@ -1,9 +1,7 @@
import analytics from '@components/analytics' import analytics from '@components/analytics'
import { HeaderRight } from '@components/Header' import { HeaderRight } from '@components/Header'
import ComponentSeparator from '@components/Separator'
import Timeline from '@components/Timeline' import Timeline from '@components/Timeline'
import TimelineDefault from '@components/Timeline/Default' import TimelineDefault from '@components/Timeline/Default'
import TimelineLookback from '@components/Timeline/Lookback'
import SegmentedControl from '@react-native-community/segmented-control' import SegmentedControl from '@react-native-community/segmented-control'
import { createNativeStackNavigator } from '@react-navigation/native-stack' import { createNativeStackNavigator } from '@react-navigation/native-stack'
import { import {
@ -12,7 +10,6 @@ import {
} from '@utils/navigation/navigators' } from '@utils/navigation/navigators'
import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
import { getInstanceTimelinesLookback } from '@utils/slices/instancesSlice' import { getInstanceTimelinesLookback } from '@utils/slices/instancesSlice'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager' import { useTheme } from '@utils/styles/ThemeManager'
import React, { useCallback, useMemo, useState } from 'react' import React, { useCallback, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
@ -90,17 +87,7 @@ const TabPublic = React.memo(
const queryKey: QueryKeyTimeline = ['Timeline', { page }] const queryKey: QueryKeyTimeline = ['Timeline', { page }]
const renderItem = ({ item }: any) => { const renderItem = ({ item }: any) => {
if (timelinesLookback?.[page]?.ids?.[0] === item.id) { if (timelinesLookback?.[page]?.ids?.[0] === item.id) {
return ( return <TimelineDefault item={item} queryKey={queryKey} />
<>
<TimelineLookback />
<ComponentSeparator
extraMarginLeft={
StyleConstants.Avatar.M + StyleConstants.Spacing.S
}
/>
<TimelineDefault item={item} queryKey={queryKey} />
</>
)
} }
return <TimelineDefault item={item} queryKey={queryKey} /> return <TimelineDefault item={item} queryKey={queryKey} />
} }