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.

Search in PWI (#3628)

authored by

dan and committed by
GitHub
ce1c1e1c d3c0b48d

+52 -92
+52 -92
src/view/screens/Search/Search.tsx
··· 393 393 ) 394 394 } 395 395 396 - export function SearchScreenInner({ 397 - query, 398 - primarySearch, 399 - }: { 400 - query?: string 401 - primarySearch?: boolean 402 - }) { 396 + export function SearchScreenInner({query}: {query?: string}) { 403 397 const pal = usePalette('default') 404 398 const setMinimalShellMode = useSetMinimalShellMode() 405 399 const setDrawerSwipeDisabled = useSetDrawerSwipeDisabled() ··· 419 413 420 414 const sections = React.useMemo(() => { 421 415 if (!query) return [] 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 - ] 451 - } else { 452 - return [ 453 - { 454 - title: _(msg`People`), 455 - component: ( 456 - <SearchScreenUserResults query={query} active={activeTab === 0} /> 457 - ), 458 - }, 459 - ] 460 - } 461 - }, [hasSession, _, query, activeTab]) 462 - 463 - if (hasSession) { 464 - return query ? ( 465 - <Pager 466 - onPageSelected={onPageSelected} 467 - renderTabBar={props => ( 468 - <CenteredView 469 - sideBorders 470 - style={[pal.border, pal.view, styles.tabBarContainer]}> 471 - <TabBar items={sections.map(section => section.title)} {...props} /> 472 - </CenteredView> 473 - )} 474 - initialPage={0}> 475 - {sections.map((section, i) => ( 476 - <View key={i}>{section.component}</View> 477 - ))} 478 - </Pager> 479 - ) : ( 480 - <View> 481 - <CenteredView sideBorders style={pal.border}> 482 - <Text 483 - type="title" 484 - style={[ 485 - pal.text, 486 - pal.border, 487 - { 488 - display: 'flex', 489 - paddingVertical: 12, 490 - paddingHorizontal: 18, 491 - fontWeight: 'bold', 492 - }, 493 - ]}> 494 - <Trans>Suggested Follows</Trans> 495 - </Text> 496 - </CenteredView> 497 - 498 - <SearchScreenSuggestedFollows /> 499 - </View> 500 - ) 501 - } 416 + return [ 417 + { 418 + title: _(msg`Top`), 419 + component: ( 420 + <SearchScreenPostResults 421 + query={query} 422 + sort="top" 423 + active={activeTab === 0} 424 + /> 425 + ), 426 + }, 427 + { 428 + title: _(msg`Latest`), 429 + component: ( 430 + <SearchScreenPostResults 431 + query={query} 432 + sort="latest" 433 + active={activeTab === 1} 434 + /> 435 + ), 436 + }, 437 + { 438 + title: _(msg`People`), 439 + component: ( 440 + <SearchScreenUserResults query={query} active={activeTab === 2} /> 441 + ), 442 + }, 443 + ] 444 + }, [_, query, activeTab]) 502 445 503 446 return query ? ( 504 447 <Pager ··· 515 458 <View key={i}>{section.component}</View> 516 459 ))} 517 460 </Pager> 461 + ) : hasSession ? ( 462 + <View> 463 + <CenteredView sideBorders style={pal.border}> 464 + <Text 465 + type="title" 466 + style={[ 467 + pal.text, 468 + pal.border, 469 + { 470 + display: 'flex', 471 + paddingVertical: 12, 472 + paddingHorizontal: 18, 473 + fontWeight: 'bold', 474 + }, 475 + ]}> 476 + <Trans>Suggested Follows</Trans> 477 + </Text> 478 + </CenteredView> 479 + 480 + <SearchScreenSuggestedFollows /> 481 + </View> 518 482 ) : ( 519 483 <CenteredView sideBorders style={pal.border}> 520 484 <View ··· 554 518 style={pal.textLight} 555 519 /> 556 520 <Text type="xl" style={[pal.textLight, {paddingHorizontal: 18}]}> 557 - {isDesktop && !primarySearch ? ( 558 - <Trans>Find users with the search tool on the right</Trans> 559 - ) : ( 560 - <Trans>Find users on Bluesky</Trans> 561 - )} 521 + <Trans>Find posts and users on Bluesky</Trans> 562 522 </Text> 563 523 </View> 564 524 </View>