Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Kill 'Follows you' pill in place of 'Mutuals' on follow button

authored by partially.dead.aylac.top and committed by xan.lol cfc7acce ab8068cc

verified
+43 -51
-28
src/components/Pills.tsx
··· 1 1 import React from 'react' 2 2 import {View} from 'react-native' 3 3 import {BSKY_LABELER_DID, type ModerationCause} from '@atproto/api' 4 - import {Trans} from '@lingui/macro' 5 4 6 5 import {useModerationCauseDescription} from '#/lib/moderation/useModerationCauseDescription' 7 6 import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' ··· 153 152 </> 154 153 ) 155 154 } 156 - 157 - export function FollowsYou({size = 'sm'}: CommonProps) { 158 - const t = useTheme() 159 - 160 - const variantStyles = React.useMemo(() => { 161 - switch (size) { 162 - case 'sm': 163 - case 'lg': 164 - default: 165 - return [ 166 - { 167 - paddingHorizontal: 6, 168 - paddingVertical: 3, 169 - borderRadius: 4, 170 - }, 171 - ] 172 - } 173 - }, [size]) 174 - 175 - return ( 176 - <View style={[variantStyles, a.justify_center, t.atoms.bg_contrast_50]}> 177 - <Text style={[a.text_xs, a.leading_tight]}> 178 - <Trans>Follows You</Trans> 179 - </Text> 180 - </View> 181 - ) 182 - }
+13 -7
src/components/ProfileCard.tsx
··· 536 536 } 537 537 } 538 538 539 - const unfollowLabel = _( 540 - msg({ 541 - message: 'Following', 542 - comment: 'User is following this account, click to unfollow', 543 - }), 544 - ) 539 + const unfollowLabel = profile.viewer?.followedBy 540 + ? _( 541 + msg({ 542 + message: 'Mutuals', 543 + comment: 'User is following this account, click to unfollow', 544 + }), 545 + ) 546 + : _( 547 + msg({ 548 + message: 'Following', 549 + comment: 'User is following this account, click to unfollow', 550 + }), 551 + ) 545 552 const followLabel = profile.viewer?.followedBy 546 553 ? _( 547 554 msg({ ··· 632 639 633 640 return ( 634 641 <Pills.Row style={[a.pt_xs]}> 635 - {followedBy && <Pills.FollowsYou />} 636 642 {modui.alerts.map(alert => ( 637 643 <Pills.Label key={getModerationCauseKey(alert)} cause={alert} /> 638 644 ))}
+12 -4
src/components/ProfileHoverCard/index.web.tsx
··· 495 495 variant="solid" 496 496 label={ 497 497 profileShadow.viewer?.following 498 - ? _(msg`Following`) 499 - : _(msg`Follow`) 498 + ? profileShadow.viewer?.followedBy 499 + ? _(msg`Mutuals`) 500 + : _(msg`Following`) 501 + : profileShadow.viewer?.followedBy 502 + ? _(msg`Follow back`) 503 + : _(msg`Follow`) 500 504 } 501 505 style={enableSquareButtons ? [a.rounded_sm] : [a.rounded_full]} 502 506 onPress={profileShadow.viewer?.following ? unfollow : follow}> ··· 506 510 /> 507 511 <ButtonText> 508 512 {profileShadow.viewer?.following 509 - ? _(msg`Following`) 510 - : _(msg`Follow`)} 513 + ? profileShadow.viewer?.followedBy 514 + ? _(msg`Mutuals`) 515 + : _(msg`Following`) 516 + : profileShadow.viewer?.followedBy 517 + ? _(msg`Follow back`) 518 + : _(msg`Follow`)} 511 519 </ButtonText> 512 520 </Button> 513 521 ))}
+2
src/screens/PostThread/components/ThreadItemAnchorFollowButton.tsx
··· 133 133 ) : ( 134 134 <Trans>Follow</Trans> 135 135 ) 136 + ) : isFollowedBy ? ( 137 + <Trans>Mutuals</Trans> 136 138 ) : ( 137 139 <Trans>Following</Trans> 138 140 )}
+2 -9
src/screens/Profile/Header/Handle.tsx
··· 1 1 import {View} from 'react-native' 2 2 import {type AppBskyActorDefs} from '@atproto/api' 3 - import {msg, Trans} from '@lingui/macro' 3 + import {msg} from '@lingui/macro' 4 4 import {useLingui} from '@lingui/react' 5 5 6 6 import {isInvalidHandle, sanitizeHandle} from '#/lib/strings/handles' ··· 22 22 const t = useTheme() 23 23 const {_} = useLingui() 24 24 const invalidHandle = isInvalidHandle(profile.handle) 25 - const blockHide = profile.viewer?.blocking || profile.viewer?.blockedBy 26 25 const isBskySocialHandle = profile.handle.endsWith('.bsky.social') 27 26 const showProfileInHandle = useShowLinkInHandle() 28 27 const sanitized = sanitizeHandle( ··· 36 35 style={[a.flex_row, a.gap_sm, a.align_center, {maxWidth: '100%'}]} 37 36 pointerEvents={disableTaps ? 'none' : isIOS ? 'auto' : 'box-none'}> 38 37 <NewskieDialog profile={profile} disabled={disableTaps} /> 39 - {profile.viewer?.followedBy && !blockHide ? ( 40 - <View style={[t.atoms.bg_contrast_50, a.rounded_xs, a.px_sm, a.py_xs]}> 41 - <Text style={[t.atoms.text, a.text_sm]}> 42 - <Trans>Follows you</Trans> 43 - </Text> 44 - </View> 45 - ) : undefined} 38 + 46 39 <Text 47 40 emoji 48 41 numberOfLines={1}
+5 -1
src/screens/Profile/Header/ProfileHeaderStandard.tsx
··· 371 371 {!profile.viewer?.following && <ButtonIcon icon={Plus} />} 372 372 <ButtonText> 373 373 {profile.viewer?.following ? ( 374 - <Trans>Following</Trans> 374 + profile.viewer?.followedBy ? ( 375 + <Trans>Mutuals</Trans> 376 + ) : ( 377 + <Trans>Following</Trans> 378 + ) 375 379 ) : profile.viewer?.followedBy ? ( 376 380 <Trans>Follow back</Trans> 377 381 ) : (
+9 -2
src/view/com/profile/ProfileMenu.tsx
··· 78 78 const queryClient = useQueryClient() 79 79 const navigation = useNavigation<NavigationProp>() 80 80 const isSelf = currentAccount?.did === profile.did 81 + const isFollowedBy = profile.viewer?.followedBy 81 82 const isFollowing = profile.viewer?.following 82 83 const isBlocked = profile.viewer?.blocking || profile.viewer?.blockedBy 83 84 const isFollowingBlockedAccount = isFollowing && isBlocked ··· 327 328 testID="profileHeaderDropdownFollowBtn" 328 329 label={ 329 330 isFollowing 330 - ? _(msg`Unfollow account`) 331 + ? isFollowedBy 332 + ? _(msg`Divorce mutual`) 333 + : _(msg`Unfollow account`) 331 334 : _(msg`Follow account`) 332 335 } 333 336 onPress={ ··· 337 340 }> 338 341 <Menu.ItemText> 339 342 {isFollowing ? ( 340 - <Trans>Unfollow account</Trans> 343 + isFollowedBy ? ( 344 + <Trans>Divorce mutual</Trans> 345 + ) : ( 346 + <Trans>Unfollow account</Trans> 347 + ) 341 348 ) : ( 342 349 <Trans>Follow account</Trans> 343 350 )}