Bluesky app fork with some witchin' additions 💫

Make following/follower count metric toggles work with mobile drawer/navbar

xan.lol fe71a132 b1a7eaff

verified
Changed files
+40 -23
src
view
shell
+40 -23
src/view/shell/Drawer.tsx
··· 15 15 import {colors} from '#/lib/styles' 16 16 import {isWeb} from '#/platform/detection' 17 17 import {emitSoftReset} from '#/state/events' 18 + import {useDisableFollowersMetrics} from '#/state/preferences/disable-followers-metrics' 19 + import {useDisableFollowingMetrics} from '#/state/preferences/disable-following-metrics' 18 20 import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 19 21 import {useKawaiiMode} from '#/state/preferences/kawaii' 20 22 import {useUnreadNotifications} from '#/state/queries/notifications/unread' ··· 72 74 const verification = useSimpleVerificationState({profile}) 73 75 const {isActive: live} = useActorStatus(profile) 74 76 77 + // disable metrics 78 + const disableFollowersMetrics = useDisableFollowersMetrics() 79 + const disableFollowingMetrics = useDisableFollowingMetrics() 80 + 75 81 return ( 76 82 <TouchableOpacity 77 83 testID="profileCardButton" ··· 114 120 {sanitizeHandle(account.handle, '@')} 115 121 </Text> 116 122 </View> 117 - <Text style={[a.text_md, t.atoms.text_contrast_medium]}> 118 - <Trans> 119 - <Text style={[a.text_md, a.font_semi_bold]}> 120 - {formatCount(i18n, profile?.followersCount ?? 0)} 121 - </Text>{' '} 122 - <Plural 123 - value={profile?.followersCount || 0} 124 - one="follower" 125 - other="followers" 126 - /> 127 - </Trans>{' '} 128 - &middot;{' '} 129 - <Trans> 130 - <Text style={[a.text_md, a.font_semi_bold]}> 131 - {formatCount(i18n, profile?.followsCount ?? 0)} 132 - </Text>{' '} 133 - <Plural 134 - value={profile?.followsCount || 0} 135 - one="following" 136 - other="following" 137 - /> 138 - </Trans> 139 - </Text> 123 + {disableFollowersMetrics && disableFollowingMetrics ? null : ( 124 + <Text style={[a.text_md, t.atoms.text_contrast_medium]}> 125 + {!disableFollowersMetrics ? ( 126 + <Trans> 127 + <Text style={[a.text_md, a.font_semi_bold]}> 128 + {formatCount(i18n, profile?.followersCount ?? 0)} 129 + </Text>{' '} 130 + <Plural 131 + value={profile?.followersCount || 0} 132 + one="follower" 133 + other="followers" 134 + /> 135 + </Trans> 136 + ) : null} 137 + {!disableFollowersMetrics && !disableFollowingMetrics ? ( 138 + <Text style={[a.text_md, t.atoms.text_contrast_medium]}> 139 + {' '} 140 + &middot;{' '} 141 + </Text> 142 + ) : null} 143 + {!disableFollowingMetrics ? ( 144 + <Trans> 145 + <Text style={[a.text_md, a.font_semi_bold]}> 146 + {formatCount(i18n, profile?.followsCount ?? 0)} 147 + </Text>{' '} 148 + <Plural 149 + value={profile?.followsCount || 0} 150 + one="following" 151 + other="following" 152 + /> 153 + </Trans> 154 + ) : null} 155 + </Text> 156 + )} 140 157 </TouchableOpacity> 141 158 ) 142 159 }