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

Configure Feed

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

add more toggleable metrics

adds hiding the followers, following and posts/skeets count, also adds option to hide "followed by" text

renames a very small amount of experiments to be nicer to read n to be consistent

also removes unused code from deer settings

Tangled acbbc1c9 e009a703

+209 -82
+37 -22
src/components/ProfileHoverCard/index.web.tsx
··· 18 18 import {sanitizeDisplayName} from '#/lib/strings/display-names' 19 19 import {sanitizeHandle} from '#/lib/strings/handles' 20 20 import {useProfileShadow} from '#/state/cache/profile-shadow' 21 + import {useDisableFollowedByMetrics} from '#/state/preferences/disable-followed-by-metrics' 22 + import {useDisableFollowersMetrics} from '#/state/preferences/disable-followers-metrics' 23 + import {useDisableFollowingMetrics} from '#/state/preferences/disable-following-metrics' 21 24 import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 22 25 import {useModerationOpts} from '#/state/preferences/moderation-opts' 23 26 import {usePrefetchProfileQuery, useProfileQuery} from '#/state/queries/profile' ··· 463 466 464 467 const enableSquareButtons = useEnableSquareButtons() 465 468 469 + // disable metrics 470 + const disableFollowersMetrics = useDisableFollowersMetrics() 471 + const disableFollowingMetrics = useDisableFollowingMetrics() 472 + const disableFollowedByMetrics = useDisableFollowedByMetrics() 473 + 466 474 return ( 467 475 <View> 468 476 <View style={[a.flex_row, a.justify_between, a.align_start]}> ··· 572 580 573 581 {!isBlockedUser && ( 574 582 <> 575 - <View style={[a.flex_row, a.flex_wrap, a.gap_md, a.pt_xs]}> 576 - <InlineLinkText 577 - to={makeProfileLink(profile, 'followers')} 578 - label={`${followers} ${pluralizedFollowers}`} 579 - style={[t.atoms.text]} 580 - onPress={hide}> 581 - <Text style={[a.text_md, a.font_semi_bold]}>{followers} </Text> 582 - <Text style={[t.atoms.text_contrast_medium]}> 583 - {pluralizedFollowers} 584 - </Text> 585 - </InlineLinkText> 586 - <InlineLinkText 587 - to={makeProfileLink(profile, 'follows')} 588 - label={_(msg`${following} following`)} 589 - style={[t.atoms.text]} 590 - onPress={hide}> 591 - <Text style={[a.text_md, a.font_semi_bold]}>{following} </Text> 592 - <Text style={[t.atoms.text_contrast_medium]}> 593 - {pluralizedFollowings} 594 - </Text> 595 - </InlineLinkText> 596 - </View> 583 + {disableFollowersMetrics && disableFollowingMetrics ? ( null ) : 584 + <View style={[a.flex_row, a.flex_wrap, a.gap_md, a.pt_xs]}> 585 + {!disableFollowersMetrics ? ( 586 + <InlineLinkText 587 + to={makeProfileLink(profile, 'followers')} 588 + label={`${followers} ${pluralizedFollowers}`} 589 + style={[t.atoms.text]} 590 + onPress={hide}> 591 + <Text style={[a.text_md, a.font_semi_bold]}>{followers} </Text> 592 + <Text style={[t.atoms.text_contrast_medium]}> 593 + {pluralizedFollowers} 594 + </Text> 595 + </InlineLinkText> 596 + ) : null} 597 + {!disableFollowingMetrics ? ( 598 + <InlineLinkText 599 + to={makeProfileLink(profile, 'follows')} 600 + label={_(msg`${following} following`)} 601 + style={[t.atoms.text]} 602 + onPress={hide}> 603 + <Text style={[a.text_md, a.font_semi_bold]}>{following} </Text> 604 + <Text style={[t.atoms.text_contrast_medium]}> 605 + {pluralizedFollowings} 606 + </Text> 607 + </InlineLinkText> 608 + ) : null} 609 + </View> 610 + } 597 611 598 612 {profile.description?.trim() && !moderation.ui('profileView').blur ? ( 599 613 <View style={[a.pt_md]}> ··· 606 620 ) : undefined} 607 621 608 622 {!isMe && 623 + !disableFollowedByMetrics && 609 624 shouldShowKnownFollowers(profile.viewer?.knownFollowers) && ( 610 625 <View style={[a.flex_row, a.align_center, a.gap_sm, a.pt_md]}> 611 626 <KnownFollowers
+48 -30
src/screens/Profile/Header/Metrics.tsx
··· 5 5 6 6 import {makeProfileLink} from '#/lib/routes/links' 7 7 import {type Shadow} from '#/state/cache/types' 8 + import {useDisableFollowersMetrics} from '#/state/preferences/disable-followers-metrics' 9 + import {useDisableFollowingMetrics} from '#/state/preferences/disable-following-metrics' 10 + import {useDisablePostsMetrics} from '#/state/preferences/disable-posts-metrics' 8 11 import {formatCount} from '#/view/com/util/numeric/format' 9 12 import {atoms as a, useTheme} from '#/alf' 10 13 import {InlineLinkText} from '#/components/Link' ··· 28 31 other: 'following', 29 32 }) 30 33 34 + // disable metrics 35 + const disableFollowersMetrics = useDisableFollowersMetrics() 36 + const disableFollowingMetrics = useDisableFollowingMetrics() 37 + const disablePostsMetrics = useDisablePostsMetrics() 38 + 31 39 return ( 32 - <View 33 - style={[a.flex_row, a.gap_sm, a.align_center]} 34 - pointerEvents="box-none"> 35 - <InlineLinkText 36 - testID="profileHeaderFollowersButton" 37 - style={[a.flex_row, t.atoms.text]} 38 - to={makeProfileLink(profile, 'followers')} 39 - label={`${profile.followersCount || 0} ${pluralizedFollowers}`}> 40 - <Text style={[a.font_semi_bold, a.text_md]}>{followers} </Text> 41 - <Text style={[t.atoms.text_contrast_medium, a.text_md]}> 42 - {pluralizedFollowers} 43 - </Text> 44 - </InlineLinkText> 45 - <InlineLinkText 46 - testID="profileHeaderFollowsButton" 47 - style={[a.flex_row, t.atoms.text]} 48 - to={makeProfileLink(profile, 'follows')} 49 - label={_(msg`${profile.followsCount || 0} following`)}> 50 - <Text style={[a.font_semi_bold, a.text_md]}>{following} </Text> 51 - <Text style={[t.atoms.text_contrast_medium, a.text_md]}> 52 - {pluralizedFollowings} 53 - </Text> 54 - </InlineLinkText> 55 - <Text style={[a.font_semi_bold, t.atoms.text, a.text_md]}> 56 - {formatCount(i18n, profile.postsCount || 0)}{' '} 57 - <Text style={[t.atoms.text_contrast_medium, a.font_normal, a.text_md]}> 58 - {plural(profile.postsCount || 0, {one: 'skeet', other: 'skeets'})} 59 - </Text> 60 - </Text> 61 - </View> 40 + <> 41 + {disableFollowersMetrics && disableFollowingMetrics && disablePostsMetrics ? ( null ) : 42 + <View 43 + style={[a.flex_row, a.gap_sm, a.align_center]} 44 + pointerEvents="box-none"> 45 + {!disableFollowersMetrics ? ( 46 + <InlineLinkText 47 + testID="profileHeaderFollowersButton" 48 + style={[a.flex_row, t.atoms.text]} 49 + to={makeProfileLink(profile, 'followers')} 50 + label={`${profile.followersCount || 0} ${pluralizedFollowers}`}> 51 + <Text style={[a.font_semi_bold, a.text_md]}>{followers} </Text> 52 + <Text style={[t.atoms.text_contrast_medium, a.text_md]}> 53 + {pluralizedFollowers} 54 + </Text> 55 + </InlineLinkText> 56 + ) : null} 57 + {!disableFollowingMetrics ? ( 58 + <InlineLinkText 59 + testID="profileHeaderFollowsButton" 60 + style={[a.flex_row, t.atoms.text]} 61 + to={makeProfileLink(profile, 'follows')} 62 + label={_(msg`${profile.followsCount || 0} following`)}> 63 + <Text style={[a.font_semi_bold, a.text_md]}>{following} </Text> 64 + <Text style={[t.atoms.text_contrast_medium, a.text_md]}> 65 + {pluralizedFollowings} 66 + </Text> 67 + </InlineLinkText> 68 + ) : null} 69 + {!disablePostsMetrics ? ( 70 + <Text style={[a.font_semi_bold, t.atoms.text, a.text_md]}> 71 + {formatCount(i18n, profile.postsCount || 0)}{' '} 72 + <Text style={[t.atoms.text_contrast_medium, a.font_normal, a.text_md]}> 73 + {plural(profile.postsCount || 0, {one: 'skeet', other: 'skeets'})} 74 + </Text> 75 + </Text> 76 + ) : null} 77 + </View> 78 + } 79 + </> 62 80 ) 63 81 }
+5
src/screens/Profile/Header/ProfileHeaderStandard.tsx
··· 17 17 import {logger} from '#/logger' 18 18 import {isIOS} from '#/platform/detection' 19 19 import {type Shadow, useProfileShadow} from '#/state/cache/profile-shadow' 20 + import {useDisableFollowedByMetrics} from '#/state/preferences/disable-followed-by-metrics' 20 21 import { 21 22 useProfileBlockMutationQueue, 22 23 useProfileFollowMutationQueue, ··· 94 95 95 96 const {isActive: live} = useActorStatus(profile) 96 97 98 + // disable metrics 99 + const disableFollowedByMetrics = useDisableFollowedByMetrics() 100 + 97 101 return ( 98 102 <> 99 103 <ProfileHeaderShell ··· 164 168 ) : undefined} 165 169 166 170 {!isMe && 171 + !disableFollowedByMetrics && 167 172 !isBlockedUser && 168 173 shouldShowKnownFollowers(profile.viewer?.knownFollowers) && ( 169 174 <View style={[a.flex_row, a.align_center, a.gap_sm]}>
+92 -23
src/screens/Settings/DeerSettings.tsx
··· 17 17 import * as persisted from '#/state/persisted' 18 18 import {useGoLinksEnabled, useSetGoLinksEnabled} from '#/state/preferences' 19 19 import { 20 - useConstellationEnabled, 21 - useSetConstellationEnabled, 22 - } from '#/state/preferences/constellation-enabled' 23 - import { 24 20 useConstellationInstance, 25 21 useSetConstellationInstance, 26 22 } from '#/state/preferences/constellation-instance' ··· 34 30 useSetDirectFetchRecords, 35 31 } from '#/state/preferences/direct-fetch-records' 36 32 import { 33 + useDisableFollowersMetrics, 34 + useSetDisableFollowersMetrics 35 + } from '#/state/preferences/disable-followers-metrics' 36 + import { 37 + useDisableFollowingMetrics, 38 + useSetDisableFollowingMetrics 39 + } from '#/state/preferences/disable-following-metrics' 40 + import { 41 + useDisableFollowedByMetrics, 42 + useSetDisableFollowedByMetrics 43 + } from '#/state/preferences/disable-followed-by-metrics' 44 + import { 37 45 useDisableLikesMetrics, 38 46 useSetDisableLikesMetrics, 39 47 } from '#/state/preferences/disable-likes-metrics' ··· 45 53 useDisableReplyMetrics, 46 54 useSetDisableReplyMetrics, 47 55 } from '#/state/preferences/disable-reply-metrics' 56 + import { 57 + useDisablePostsMetrics, 58 + useSetDisablePostsMetrics, 59 + } from '#/state/preferences/disable-posts-metrics' 48 60 import { 49 61 useDisableRepostsMetrics, 50 62 useSetDisableRepostsMetrics, ··· 66 78 useSetEnableSquareButtons, 67 79 } from '#/state/preferences/enable-square-buttons' 68 80 import { 81 + useSetShowExternalShareButtons, 82 + useShowExternalShareButtons, 83 + } from '#/state/preferences/external-share-buttons' 84 + import { 69 85 useHideFeedsPromoTab, 70 86 useSetHideFeedsPromoTab, 71 87 } from '#/state/preferences/hide-feeds-promo-tab' ··· 95 111 useShowLinkInHandle, 96 112 } from '#/state/preferences/show-link-in-handle.tsx' 97 113 import {useProfilesQuery} from '#/state/queries/profile' 98 - import { 99 - useSetShowExternalShareButtons, 100 - useShowExternalShareButtons, 101 - } from '#/state/preferences/external-share-buttons' 102 114 import * as SettingsList from '#/screens/Settings/components/SettingsList' 103 115 import {atoms as a, useBreakpoints} from '#/alf' 104 116 import {Admonition} from '#/components/Admonition' ··· 250 262 const goLinksEnabled = useGoLinksEnabled() 251 263 const setGoLinksEnabled = useSetGoLinksEnabled() 252 264 253 - const constellationEnabled = useConstellationEnabled() 254 - const setConstellationEnabled = useSetConstellationEnabled() 255 - 256 265 const directFetchRecords = useDirectFetchRecords() 257 266 const setDirectFetchRecords = useSetDirectFetchRecords() 258 267 ··· 288 297 289 298 const disableReplyMetrics = useDisableReplyMetrics() 290 299 const setDisableReplyMetrics = useSetDisableReplyMetrics() 300 + 301 + const disableFollowersMetrics = useDisableFollowersMetrics() 302 + const setDisableFollowersMetrics = useSetDisableFollowersMetrics() 303 + 304 + const disableFollowingMetrics = useDisableFollowingMetrics() 305 + const setDisableFollowingMetrics = useSetDisableFollowingMetrics() 306 + 307 + const disableFollowedByMetrics = useDisableFollowedByMetrics() 308 + const setDisableFollowedByMetrics = useSetDisableFollowedByMetrics() 309 + 310 + const disablePostsMetrics = useDisablePostsMetrics() 311 + const setDisablePostsMetrics = useSetDisablePostsMetrics() 291 312 292 313 const hideSimilarAccountsRecomm = useHideSimilarAccountsRecomm() 293 314 const setHideSimilarAccountsRecomm = useSetHideSimilarAccountsRecomm() ··· 545 566 546 567 <Toggle.Item 547 568 name="disable_via_repost_notification" 548 - label={_(msg`Disable via reskeet notifications`)} 569 + label={_(msg`Disable "via reskeet" notifications`)} 549 570 value={disableViaRepostNotification} 550 571 onChange={value => setDisableViaRepostNotification(value)} 551 572 style={[a.w_full]}> 552 573 <Toggle.LabelText style={[a.flex_1]}> 553 - <Trans>Disable via reskeet notifications</Trans> 574 + <Trans>Disable "via reskeet" notifications</Trans> 554 575 </Toggle.LabelText> 555 576 <Toggle.Platform /> 556 577 </Toggle.Item> ··· 606 627 607 628 <Toggle.Item 608 629 name="disable_likes_metrics" 609 - label={_(msg`Disable Likes Metrics`)} 630 + label={_(msg`Disable likes metrics`)} 610 631 value={disableLikesMetrics} 611 632 onChange={value => setDisableLikesMetrics(value)} 612 633 style={[a.w_full]}> 613 634 <Toggle.LabelText style={[a.flex_1]}> 614 - <Trans>Disable Likes Metrics</Trans> 635 + <Trans>Disable likes metrics</Trans> 615 636 </Toggle.LabelText> 616 637 <Toggle.Platform /> 617 638 </Toggle.Item> 618 639 619 640 <Toggle.Item 620 641 name="disable_reposts_metrics" 621 - label={_(msg`Disable Reskeets Metrics`)} 642 + label={_(msg`Disable reskeets metrics`)} 622 643 value={disableRepostsMetrics} 623 644 onChange={value => setDisableRepostsMetrics(value)} 624 645 style={[a.w_full]}> 625 646 <Toggle.LabelText style={[a.flex_1]}> 626 - <Trans>Disable Reskeets Metrics</Trans> 647 + <Trans>Disable reskeets metrics</Trans> 627 648 </Toggle.LabelText> 628 649 <Toggle.Platform /> 629 650 </Toggle.Item> 630 651 631 652 <Toggle.Item 632 653 name="disable_quotes_metrics" 633 - label={_(msg`Disable Quotes Metrics`)} 654 + label={_(msg`Disable quotes metrics`)} 634 655 value={disableQuotesMetrics} 635 656 onChange={value => setDisableQuotesMetrics(value)} 636 657 style={[a.w_full]}> 637 658 <Toggle.LabelText style={[a.flex_1]}> 638 - <Trans>Disable Quotes Metrics</Trans> 659 + <Trans>Disable quotes metrics</Trans> 639 660 </Toggle.LabelText> 640 661 <Toggle.Platform /> 641 662 </Toggle.Item> 642 663 643 664 <Toggle.Item 644 665 name="disable_saves_metrics" 645 - label={_(msg`Disable Saves Metrics`)} 666 + label={_(msg`Disable saves metrics`)} 646 667 value={disableSavesMetrics} 647 668 onChange={value => setDisableSavesMetrics(value)} 648 669 style={[a.w_full]}> 649 670 <Toggle.LabelText style={[a.flex_1]}> 650 - <Trans>Disable Saves Metrics</Trans> 671 + <Trans>Disable saves metrics</Trans> 651 672 </Toggle.LabelText> 652 673 <Toggle.Platform /> 653 674 </Toggle.Item> 654 675 655 676 <Toggle.Item 656 677 name="disable_reply_metrics" 657 - label={_(msg`Disable Reply Metrics`)} 678 + label={_(msg`Disable reply metrics`)} 658 679 value={disableReplyMetrics} 659 680 onChange={value => setDisableReplyMetrics(value)} 660 681 style={[a.w_full]}> 661 682 <Toggle.LabelText style={[a.flex_1]}> 662 - <Trans>Disable Reply Metrics</Trans> 683 + <Trans>Disable reply metrics</Trans> 684 + </Toggle.LabelText> 685 + <Toggle.Platform /> 686 + </Toggle.Item> 687 + 688 + <Toggle.Item 689 + name="disable_followers_metrics" 690 + label={_(msg`Disable followers metrics`)} 691 + value={disableFollowersMetrics} 692 + onChange={value => setDisableFollowersMetrics(value)} 693 + style={[a.w_full]}> 694 + <Toggle.LabelText style={[a.flex_1]}> 695 + <Trans>Disable followers metrics</Trans> 696 + </Toggle.LabelText> 697 + <Toggle.Platform /> 698 + </Toggle.Item> 699 + 700 + <Toggle.Item 701 + name="disable_following_metrics" 702 + label={_(msg`Disable following metrics`)} 703 + value={disableFollowingMetrics} 704 + onChange={value => setDisableFollowingMetrics(value)} 705 + style={[a.w_full]}> 706 + <Toggle.LabelText style={[a.flex_1]}> 707 + <Trans>Disable following metrics</Trans> 708 + </Toggle.LabelText> 709 + <Toggle.Platform /> 710 + </Toggle.Item> 711 + 712 + <Toggle.Item 713 + name="disable_followed_by_metrics" 714 + label={_(msg`Disable "followed by" metrics`)} 715 + value={disableFollowedByMetrics} 716 + onChange={value => setDisableFollowedByMetrics(value)} 717 + style={[a.w_full]}> 718 + <Toggle.LabelText style={[a.flex_1]}> 719 + <Trans>Disable "followed by" metrics</Trans> 720 + </Toggle.LabelText> 721 + <Toggle.Platform /> 722 + </Toggle.Item> 723 + 724 + <Toggle.Item 725 + name="disable_posts_metrics" 726 + label={_(msg`Disable skeets metrics`)} 727 + value={disablePostsMetrics} 728 + onChange={value => setDisablePostsMetrics(value)} 729 + style={[a.w_full]}> 730 + <Toggle.LabelText style={[a.flex_1]}> 731 + <Trans>Disable skeets metrics</Trans> 663 732 </Toggle.LabelText> 664 733 <Toggle.Platform /> 665 734 </Toggle.Item>
+8
src/state/persisted/schema.ts
··· 151 151 disableQuotesMetrics: z.boolean().optional(), 152 152 disableSavesMetrics: z.boolean().optional(), 153 153 disableReplyMetrics: z.boolean().optional(), 154 + disableFollowersMetrics: z.boolean().optional(), 155 + disableFollowingMetrics: z.boolean().optional(), 156 + disableFollowedByMetrics: z.boolean().optional(), 157 + disablePostsMetrics: z.boolean().optional(), 154 158 hideSimilarAccountsRecomm: z.boolean().optional(), 155 159 enableSquareAvatars: z.boolean().optional(), 156 160 enableSquareButtons: z.boolean().optional(), ··· 234 238 disableQuotesMetrics: false, 235 239 disableSavesMetrics: false, 236 240 disableReplyMetrics: false, 241 + disableFollowersMetrics: false, 242 + disableFollowingMetrics: false, 243 + disableFollowedByMetrics: false, 244 + disablePostsMetrics: false, 237 245 hideSimilarAccountsRecomm: true, 238 246 enableSquareAvatars: false, 239 247 enableSquareButtons: false,
+19 -7
src/state/preferences/index.tsx
··· 6 6 import {Provider as ConstellationInstanceProvider} from './constellation-instance' 7 7 import {Provider as DeerVerificationProvider} from './deer-verification' 8 8 import {Provider as DirectFetchRecordsProvider} from './direct-fetch-records' 9 + import {Provider as DisableFollowedByMetricsProvider} from './disable-followed-by-metrics' 10 + import {Provider as DisableFollowersMetricsProvider} from './disable-followers-metrics' 11 + import {Provider as DisableFollowingMetricsProvider} from './disable-following-metrics' 9 12 import {Provider as DisableHapticsProvider} from './disable-haptics' 10 13 import {Provider as DisableLikesMetricsProvider} from './disable-likes-metrics' 14 + import {Provider as DisablePostsMetricsProvider} from './disable-posts-metrics' 11 15 import {Provider as DisableQuotesMetricsProvider} from './disable-quotes-metrics' 12 16 import {Provider as DisableReplyMetricsProvider} from './disable-reply-metrics' 13 17 import {Provider as DisableRepostsMetricsProvider} from './disable-reposts-metrics' ··· 86 90 <DisableQuotesMetricsProvider> 87 91 <DisableSavesMetricsProvider> 88 92 <DisableReplyMetricsProvider> 89 - <HideSimilarAccountsRecommProvider> 90 - <EnableSquareAvatarsProvider> 91 - <EnableSquareButtonsProvider> 92 - {children} 93 - </EnableSquareButtonsProvider> 94 - </EnableSquareAvatarsProvider> 95 - </HideSimilarAccountsRecommProvider> 93 + <DisableFollowersMetricsProvider> 94 + <DisableFollowingMetricsProvider> 95 + <DisableFollowedByMetricsProvider> 96 + <DisablePostsMetricsProvider> 97 + <HideSimilarAccountsRecommProvider> 98 + <EnableSquareAvatarsProvider> 99 + <EnableSquareButtonsProvider> 100 + {children} 101 + </EnableSquareButtonsProvider> 102 + </EnableSquareAvatarsProvider> 103 + </HideSimilarAccountsRecommProvider> 104 + </DisablePostsMetricsProvider> 105 + </DisableFollowedByMetricsProvider> 106 + </DisableFollowingMetricsProvider> 107 + </DisableFollowersMetricsProvider> 96 108 </DisableReplyMetricsProvider> 97 109 </DisableSavesMetricsProvider> 98 110 </DisableQuotesMetricsProvider>