Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix double border due to progress guide (#7084)

authored by

dan and committed by
GitHub
6e20893a 2276cb0e

+11 -20
+3 -19
src/components/FeedInterstitials.tsx
··· 6 6 import {useLingui} from '@lingui/react' 7 7 import {useNavigation} from '@react-navigation/native' 8 8 9 - import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' 10 9 import {NavigationProp} from '#/lib/routes/types' 11 10 import {logEvent} from '#/lib/statsig/statsig' 12 11 import {logger} from '#/logger' ··· 16 15 import {useProfilesQuery} from '#/state/queries/profile' 17 16 import {useSuggestedFollowsByActorQuery} from '#/state/queries/suggested-follows' 18 17 import {useSession} from '#/state/session' 19 - import {useProgressGuide} from '#/state/shell/progress-guide' 20 18 import * as userActionHistory from '#/state/userActionHistory' 21 19 import {SeenPost} from '#/state/userActionHistory' 22 20 import {atoms as a, useBreakpoints, useTheme, ViewStyleProp, web} from '#/alf' ··· 506 504 507 505 export function ProgressGuide() { 508 506 const t = useTheme() 509 - const {isDesktop} = useWebMediaQueries() 510 - const guide = useProgressGuide('like-10-and-follow-7') 511 - 512 - if (isDesktop) { 513 - return null 514 - } 515 - 516 - return guide ? ( 517 - <View 518 - style={[ 519 - a.border_t, 520 - t.atoms.border_contrast_low, 521 - a.px_lg, 522 - a.py_lg, 523 - a.pb_lg, 524 - ]}> 507 + return ( 508 + <View style={[t.atoms.border_contrast_low, a.px_lg, a.py_lg, a.pb_lg]}> 525 509 <ProgressGuideList /> 526 510 </View> 527 - ) : null 511 + ) 528 512 }
+8 -1
src/view/com/posts/PostFeed.tsx
··· 16 16 17 17 import {DISCOVER_FEED_URI, KNOWN_SHUTDOWN_FEEDS} from '#/lib/constants' 18 18 import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender' 19 + import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' 19 20 import {logEvent} from '#/lib/statsig/statsig' 20 21 import {useTheme} from '#/lib/ThemeContext' 21 22 import {logger} from '#/logger' ··· 32 33 usePostFeedQuery, 33 34 } from '#/state/queries/post-feed' 34 35 import {useSession} from '#/state/session' 36 + import {useProgressGuide} from '#/state/shell/progress-guide' 35 37 import {ProgressGuide, SuggestedFollows} from '#/components/FeedInterstitials' 36 38 import {List, ListRef} from '../util/List' 37 39 import {PostFeedLoadingPlaceholder} from '../util/LoadingPlaceholder' ··· 252 254 } 253 255 }, [pollInterval]) 254 256 257 + const progressGuide = useProgressGuide('like-10-and-follow-7') 258 + const {isDesktop} = useWebMediaQueries() 259 + const showProgressIntersitial = progressGuide && !isDesktop 260 + 255 261 const feedItems: FeedRow[] = React.useMemo(() => { 256 262 let feedKind: 'following' | 'discover' | 'profile' | undefined 257 263 if (feedType === 'following') { ··· 292 298 293 299 if (hasSession) { 294 300 if (feedKind === 'discover') { 295 - if (sliceIndex === 0) { 301 + if (sliceIndex === 0 && showProgressIntersitial) { 296 302 arr.push({ 297 303 type: 'interstitialProgressGuide', 298 304 key: 'interstitial-' + sliceIndex + '-' + lastFetchedAt, ··· 382 388 feedUri, 383 389 feedTab, 384 390 hasSession, 391 + showProgressIntersitial, 385 392 ]) 386 393 387 394 // events