Fix missing top borders (#4346)
parent
2ffb98e22a
commit
6f1589971c
|
@ -14,7 +14,7 @@ import {useQueryClient} from '@tanstack/react-query'
|
||||||
import {cleanError} from '#/lib/strings/errors'
|
import {cleanError} from '#/lib/strings/errors'
|
||||||
import {useTheme} from '#/lib/ThemeContext'
|
import {useTheme} from '#/lib/ThemeContext'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {isNative} from '#/platform/detection'
|
import {isNative, isWeb} from '#/platform/detection'
|
||||||
import {hydrateFeedGenerator} from '#/state/queries/feed'
|
import {hydrateFeedGenerator} from '#/state/queries/feed'
|
||||||
import {usePreferencesQuery} from '#/state/queries/preferences'
|
import {usePreferencesQuery} from '#/state/queries/preferences'
|
||||||
import {RQKEY, useProfileFeedgensQuery} from '#/state/queries/profile-feedgens'
|
import {RQKEY, useProfileFeedgensQuery} from '#/state/queries/profile-feedgens'
|
||||||
|
@ -166,7 +166,7 @@ export const ProfileFeedgens = React.forwardRef<
|
||||||
preferences={preferences}
|
preferences={preferences}
|
||||||
style={styles.item}
|
style={styles.item}
|
||||||
showLikes
|
showLikes
|
||||||
hideTopBorder={index === 0}
|
hideTopBorder={index === 0 && !isWeb}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ import {useQueryClient} from '@tanstack/react-query'
|
||||||
import {cleanError} from '#/lib/strings/errors'
|
import {cleanError} from '#/lib/strings/errors'
|
||||||
import {useTheme} from '#/lib/ThemeContext'
|
import {useTheme} from '#/lib/ThemeContext'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {isNative} from '#/platform/detection'
|
import {isNative, isWeb} from '#/platform/detection'
|
||||||
import {RQKEY, useProfileListsQuery} from '#/state/queries/profile-lists'
|
import {RQKEY, useProfileListsQuery} from '#/state/queries/profile-lists'
|
||||||
import {useAnalytics} from 'lib/analytics/analytics'
|
import {useAnalytics} from 'lib/analytics/analytics'
|
||||||
import {FeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
|
import {FeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
|
||||||
|
@ -170,7 +170,7 @@ export const ProfileLists = React.forwardRef<SectionRef, ProfileListsProps>(
|
||||||
list={item}
|
list={item}
|
||||||
testID={`list-${item.name}`}
|
testID={`list-${item.name}`}
|
||||||
style={styles.item}
|
style={styles.item}
|
||||||
noBorder={index === 0}
|
noBorder={index === 0 && !isWeb}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
@ -32,7 +32,6 @@ import {
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import {useAnalytics} from 'lib/analytics/analytics'
|
import {useAnalytics} from 'lib/analytics/analytics'
|
||||||
import {useInitialNumToRender} from 'lib/hooks/useInitialNumToRender'
|
import {useInitialNumToRender} from 'lib/hooks/useInitialNumToRender'
|
||||||
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
|
||||||
import {useTheme} from 'lib/ThemeContext'
|
import {useTheme} from 'lib/ThemeContext'
|
||||||
import {List, ListRef} from '../util/List'
|
import {List, ListRef} from '../util/List'
|
||||||
import {PostFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
import {PostFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||||
|
@ -102,7 +101,6 @@ let Feed = ({
|
||||||
const checkForNewRef = React.useRef<(() => void) | null>(null)
|
const checkForNewRef = React.useRef<(() => void) | null>(null)
|
||||||
const lastFetchRef = React.useRef<number>(Date.now())
|
const lastFetchRef = React.useRef<number>(Date.now())
|
||||||
const [feedType, feedUri] = feed.split('|')
|
const [feedType, feedUri] = feed.split('|')
|
||||||
const {isTabletOrMobile} = useWebMediaQueries()
|
|
||||||
|
|
||||||
const opts = React.useMemo(
|
const opts = React.useMemo(
|
||||||
() => ({enabled, ignoreFilterFor}),
|
() => ({enabled, ignoreFilterFor}),
|
||||||
|
@ -314,15 +312,9 @@ let Feed = ({
|
||||||
// -prf
|
// -prf
|
||||||
return <DiscoverFallbackHeader />
|
return <DiscoverFallbackHeader />
|
||||||
}
|
}
|
||||||
return (
|
return <FeedSlice slice={item} hideTopBorder={index === 0 && !isWeb} />
|
||||||
<FeedSlice
|
|
||||||
slice={item}
|
|
||||||
hideTopBorder={index === 0 && isTabletOrMobile}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
isTabletOrMobile,
|
|
||||||
renderEmptyState,
|
renderEmptyState,
|
||||||
feed,
|
feed,
|
||||||
error,
|
error,
|
||||||
|
|
Loading…
Reference in New Issue