Handle home algo with backwards compat

This commit is contained in:
Eric Bailey
2024-04-16 20:38:14 -05:00
parent 41b5b5b283
commit e3a4fcc152
8 changed files with 109 additions and 39 deletions
+8 -5
View File
@@ -1,12 +1,13 @@
import React from 'react'
import {RenderTabBarFnProps} from 'view/com/pager/Pager'
import {HomeHeaderLayout} from './HomeHeaderLayout'
import {FeedSourceInfo} from '#/state/queries/feed'
import {useNavigation} from '@react-navigation/native'
import {usePalette} from '#/lib/hooks/usePalette'
import {FeedSourceInfo} from '#/state/queries/feed'
import {NavigationProp} from 'lib/routes/types'
import {isWeb} from 'platform/detection'
import {RenderTabBarFnProps} from 'view/com/pager/Pager'
import {TabBar} from '../pager/TabBar'
import {usePalette} from '#/lib/hooks/usePalette'
import {HomeHeaderLayout} from './HomeHeaderLayout'
export function HomeHeader(
props: RenderTabBarFnProps & {
@@ -20,7 +21,9 @@ export function HomeHeader(
const pal = usePalette('default')
const hasPinnedCustom = React.useMemo<boolean>(() => {
return feeds.some(tab => tab.uri !== '')
return feeds.some(
tab => !['home', 'home-algo', 'following'].includes(tab.uri),
)
}, [feeds])
const items = React.useMemo(() => {