Restore Feeds sparkle, fix line height

This commit is contained in:
Eric Bailey
2024-04-18 10:46:49 -05:00
parent aa1d1c23a5
commit df501d870c
3 changed files with 34 additions and 14 deletions
+6 -1
View File
@@ -24,7 +24,12 @@ export function HomeHeader(
const hasPinnedCustom = React.useMemo<boolean>(() => {
if (!hasSession) return false
return feeds.some(tab => !['home', 'following'].includes(tab.uri))
return feeds.some(tab => {
const isFollowing = ['home', 'following'].includes(tab.uri)
const isPrimaryAlgo = tab.isPrimaryAlgorithm
const isCustom = !isFollowing && !isPrimaryAlgo
return isCustom
})
}, [feeds, hasSession])
const items = React.useMemo(() => {
+10 -6
View File
@@ -1,11 +1,12 @@
import React, {useRef, useMemo, useEffect, useState, useCallback} from 'react'
import {StyleSheet, View, ScrollView, LayoutChangeEvent} from 'react-native'
import {Text} from '../util/text/Text'
import {PressableWithHover} from '../util/PressableWithHover'
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'
import {LayoutChangeEvent, ScrollView, StyleSheet, View} from 'react-native'
import {isNative} from '#/platform/detection'
import {usePalette} from 'lib/hooks/usePalette'
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
import {PressableWithHover} from '../util/PressableWithHover'
import {Text} from '../util/text/Text'
import {DraggableScrollView} from './DraggableScrollView'
import {isNative} from '#/platform/detection'
export interface TabBarProps {
testID?: string
@@ -139,7 +140,10 @@ export function TabBar({
<Text
type={isDesktop || isTablet ? 'xl-bold' : 'lg-bold'}
testID={testID ? `${testID}-${item}` : undefined}
style={selected ? pal.text : pal.textLight}>
style={[
selected ? pal.text : pal.textLight,
{lineHeight: 20},
]}>
{item}
</Text>
</View>