Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client
122
fork

Configure Feed

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

Ungate Top/Latest search (#3627)

authored by

dan and committed by
GitHub
ade2ea61 c42a5574

+38 -68
-1
src/lib/statsig/gates.ts
··· 5 5 | 'disable_poll_on_discover_v2' 6 6 | 'hide_vertical_scroll_indicators' 7 7 | 'new_profile_scroll_component' 8 - | 'new_search' 9 8 | 'receive_updates' 10 9 | 'show_follow_back_label_v2' 11 10 | 'start_session_with_following_v2'
+38 -67
src/view/screens/Search/Search.tsx
··· 407 407 const {isDesktop} = useWebMediaQueries() 408 408 const [activeTab, setActiveTab] = React.useState(0) 409 409 const {_} = useLingui() 410 - const gate = useGate() 411 410 412 411 const onPageSelected = React.useCallback( 413 412 (index: number) => { ··· 420 419 421 420 const sections = React.useMemo(() => { 422 421 if (!query) return [] 423 - if (gate('new_search')) { 424 - if (hasSession) { 425 - return [ 426 - { 427 - title: _(msg`Top`), 428 - component: ( 429 - <SearchScreenPostResults 430 - query={query} 431 - sort="top" 432 - active={activeTab === 0} 433 - /> 434 - ), 435 - }, 436 - { 437 - title: _(msg`Latest`), 438 - component: ( 439 - <SearchScreenPostResults 440 - query={query} 441 - sort="latest" 442 - active={activeTab === 1} 443 - /> 444 - ), 445 - }, 446 - { 447 - title: _(msg`People`), 448 - component: ( 449 - <SearchScreenUserResults query={query} active={activeTab === 2} /> 450 - ), 451 - }, 452 - ] 453 - } else { 454 - return [ 455 - { 456 - title: _(msg`People`), 457 - component: ( 458 - <SearchScreenUserResults query={query} active={activeTab === 0} /> 459 - ), 460 - }, 461 - ] 462 - } 422 + if (hasSession) { 423 + return [ 424 + { 425 + title: _(msg`Top`), 426 + component: ( 427 + <SearchScreenPostResults 428 + query={query} 429 + sort="top" 430 + active={activeTab === 0} 431 + /> 432 + ), 433 + }, 434 + { 435 + title: _(msg`Latest`), 436 + component: ( 437 + <SearchScreenPostResults 438 + query={query} 439 + sort="latest" 440 + active={activeTab === 1} 441 + /> 442 + ), 443 + }, 444 + { 445 + title: _(msg`People`), 446 + component: ( 447 + <SearchScreenUserResults query={query} active={activeTab === 2} /> 448 + ), 449 + }, 450 + ] 463 451 } else { 464 - if (hasSession) { 465 - return [ 466 - { 467 - title: _(msg`Posts`), 468 - component: ( 469 - <SearchScreenPostResults query={query} active={activeTab === 0} /> 470 - ), 471 - }, 472 - { 473 - title: _(msg`Users`), 474 - component: ( 475 - <SearchScreenUserResults query={query} active={activeTab === 1} /> 476 - ), 477 - }, 478 - ] 479 - } else { 480 - return [ 481 - { 482 - title: _(msg`Users`), 483 - component: ( 484 - <SearchScreenUserResults query={query} active={activeTab === 0} /> 485 - ), 486 - }, 487 - ] 488 - } 452 + return [ 453 + { 454 + title: _(msg`People`), 455 + component: ( 456 + <SearchScreenUserResults query={query} active={activeTab === 0} /> 457 + ), 458 + }, 459 + ] 489 460 } 490 - }, [hasSession, gate, _, query, activeTab]) 461 + }, [hasSession, _, query, activeTab]) 491 462 492 463 if (hasSession) { 493 464 return query ? (