Bluesky app fork with some witchin' additions 💫

Merge branch 'main' of https://github.com/bluesky-social/social-app

+91 -52
+7
src/components/PostControls/PostMenu/PostMenuItems.tsx
··· 266 266 267 267 const onHidePost = () => { 268 268 hidePost({uri: postUri}) 269 + logEvent('thread:click:hideReplyForMe', {}) 269 270 } 270 271 271 272 const hideInPWI = !!postAuthor.labels?.find( ··· 346 347 replyUri: postUri, 347 348 action, 348 349 }) 350 + 351 + // Log metric only when hiding (not when showing) 352 + if (isHide) { 353 + logEvent('thread:click:hideReplyForEveryone', {}) 354 + } 355 + 349 356 Toast.show( 350 357 isHide 351 358 ? _(msg`Reply was successfully hidden`)
-9
src/components/SubtleHover.tsx
··· 39 39 /> 40 40 ) 41 41 42 - if (hover) { 43 - console.log({ 44 - isWeb, 45 - web, 46 - isNative, 47 - native, 48 - }) 49 - } 50 - 51 42 if (isWeb && web) { 52 43 return isTouchDevice ? null : el 53 44 } else if (isNative && native) {
+13 -14
src/locale/locales/en/messages.po
··· 832 832 msgid "Adult Content" 833 833 msgstr "" 834 834 835 - #: src/screens/Moderation/index.tsx:429 835 + #: src/screens/Moderation/index.tsx:418 836 836 msgid "Adult content can only be enabled via the Web at <0>bsky.app</0>." 837 837 msgstr "" 838 838 ··· 845 845 msgid "Adult Content labels" 846 846 msgstr "" 847 847 848 - #: src/screens/Moderation/index.tsx:479 848 + #: src/screens/Moderation/index.tsx:468 849 849 msgid "Advanced" 850 850 msgstr "" 851 851 ··· 2101 2101 msgid "Confirm delete account" 2102 2102 msgstr "" 2103 2103 2104 - #: src/screens/Moderation/index.tsx:354 2104 + #: src/screens/Moderation/index.tsx:356 2105 2105 msgid "Confirm your age:" 2106 2106 msgstr "" 2107 2107 2108 - #: src/screens/Moderation/index.tsx:345 2108 + #: src/screens/Moderation/index.tsx:347 2109 2109 msgid "Confirm your birthdate" 2110 2110 msgstr "" 2111 2111 ··· 2172 2172 msgid "Content Blocked" 2173 2173 msgstr "" 2174 2174 2175 - #: src/screens/Moderation/index.tsx:341 2176 - #: src/screens/Moderation/index.tsx:375 2175 + #: src/screens/Moderation/index.tsx:340 2177 2176 msgid "Content filters" 2178 2177 msgstr "" 2179 2178 ··· 2744 2743 #: src/lib/moderation/useLabelBehaviorDescription.ts:71 2745 2744 #: src/screens/Messages/Settings.tsx:144 2746 2745 #: src/screens/Messages/Settings.tsx:147 2747 - #: src/screens/Moderation/index.tsx:419 2746 + #: src/screens/Moderation/index.tsx:408 2748 2747 msgid "Disabled" 2749 2748 msgstr "" 2750 2749 ··· 3114 3113 msgid "Enable {0} only" 3115 3114 msgstr "" 3116 3115 3117 - #: src/screens/Moderation/index.tsx:406 3116 + #: src/screens/Moderation/index.tsx:395 3118 3117 msgid "Enable adult content" 3119 3118 msgstr "" 3120 3119 ··· 3161 3160 3162 3161 #: src/screens/Messages/Settings.tsx:135 3163 3162 #: src/screens/Messages/Settings.tsx:138 3164 - #: src/screens/Moderation/index.tsx:417 3163 + #: src/screens/Moderation/index.tsx:406 3165 3164 msgid "Enabled" 3166 3165 msgstr "" 3167 3166 ··· 7867 7866 msgid "Set app icon to {0}" 7868 7867 msgstr "" 7869 7868 7870 - #: src/screens/Moderation/index.tsx:357 7869 + #: src/screens/Moderation/index.tsx:359 7871 7870 msgid "Set birthdate" 7872 7871 msgstr "" 7873 7872 ··· 8716 8715 msgid "The birthdate you've entered means you are under 18 years old. Certain content and features may be unavailable to you." 8717 8716 msgstr "" 8718 8717 8719 - #: src/screens/Moderation/index.tsx:432 8718 + #: src/screens/Moderation/index.tsx:421 8720 8719 msgid "The Bluesky web application" 8721 8720 msgstr "" 8722 8721 ··· 9200 9199 msgid "Today" 9201 9200 msgstr "" 9202 9201 9203 - #: src/screens/Moderation/index.tsx:409 9202 + #: src/screens/Moderation/index.tsx:398 9204 9203 msgid "Toggle to enable or disable adult content" 9205 9204 msgstr "" 9206 9205 ··· 10084 10083 msgid "We were unable to load your birth date preferences. Please try again." 10085 10084 msgstr "" 10086 10085 10087 - #: src/screens/Moderation/index.tsx:489 10086 + #: src/screens/Moderation/index.tsx:478 10088 10087 msgid "We were unable to load your configured labelers at this time." 10089 10088 msgstr "" 10090 10089 ··· 10604 10603 msgid "You must be following at least seven other people to generate a starter pack." 10605 10604 msgstr "" 10606 10605 10607 - #: src/screens/Moderation/index.tsx:379 10606 + #: src/screens/Moderation/index.tsx:368 10608 10607 msgid "You must complete age assurance in order to access the settings below." 10609 10608 msgstr "" 10610 10609
+2
src/logger/metrics.ts
··· 481 481 'share:press:embed': {} 482 482 483 483 'thread:click:showOtherReplies': {} 484 + 'thread:click:hideReplyForMe': {} 485 + 'thread:click:hideReplyForEveryone': {} 484 486 'thread:preferences:load': { 485 487 [key: string]: any 486 488 }
+53 -2
src/screens/Hashtag.tsx
··· 1 1 import React from 'react' 2 2 import {type ListRenderItemInfo, View} from 'react-native' 3 3 import {type AppBskyFeedDefs} from '@atproto/api' 4 - import {msg} from '@lingui/macro' 4 + import {msg, Trans} from '@lingui/macro' 5 5 import {useLingui} from '@lingui/react' 6 6 import {useFocusEffect} from '@react-navigation/native' 7 7 import {type NativeStackScreenProps} from '@react-navigation/native-stack' ··· 14 14 import {sanitizeHandle} from '#/lib/strings/handles' 15 15 import {enforceLen} from '#/lib/strings/helpers' 16 16 import {useSearchPostsQuery} from '#/state/queries/search-posts' 17 + import {useSession} from '#/state/session' 17 18 import {useSetMinimalShellMode} from '#/state/shell' 19 + import {useLoggedOutViewControls} from '#/state/shell/logged-out' 20 + import {useCloseAllActiveElements} from '#/state/util' 18 21 import {Pager} from '#/view/com/pager/Pager' 19 22 import {TabBar} from '#/view/com/pager/TabBar' 20 23 import {Post} from '#/view/com/post/Post' 21 24 import {List} from '#/view/com/util/List' 22 - import {atoms as a, web} from '#/alf' 25 + import {atoms as a, useTheme, web} from '#/alf' 23 26 import {Button, ButtonIcon} from '#/components/Button' 24 27 import {ArrowOutOfBoxModified_Stroke2_Corner2_Rounded as Share} from '#/components/icons/ArrowOutOfBox' 25 28 import * as Layout from '#/components/Layout' 29 + import {InlineLinkText} from '#/components/Link' 26 30 import {ListFooter, ListMaybePlaceholder} from '#/components/Lists' 31 + import {SearchError} from '#/components/SearchError' 32 + import {Text} from '#/components/Typography' 27 33 28 34 const renderItem = ({item}: ListRenderItemInfo<AppBskyFeedDefs.PostView>) => { 29 35 return <Post post={item} /> ··· 161 167 const {_} = useLingui() 162 168 const initialNumToRender = useInitialNumToRender() 163 169 const [isPTR, setIsPTR] = React.useState(false) 170 + const t = useTheme() 171 + const {hasSession} = useSession() 164 172 165 173 const queryParam = React.useMemo(() => { 166 174 if (!author) return fullTag ··· 193 201 if (isFetchingNextPage || !hasNextPage || error) return 194 202 fetchNextPage() 195 203 }, [isFetchingNextPage, hasNextPage, error, fetchNextPage]) 204 + 205 + const closeAllActiveElements = useCloseAllActiveElements() 206 + const {requestSwitchToAccount} = useLoggedOutViewControls() 207 + 208 + const showSignIn = () => { 209 + closeAllActiveElements() 210 + requestSwitchToAccount({requestedAccount: 'none'}) 211 + } 212 + 213 + const showCreateAccount = () => { 214 + closeAllActiveElements() 215 + requestSwitchToAccount({requestedAccount: 'new'}) 216 + } 217 + 218 + if (!hasSession) { 219 + return ( 220 + <SearchError 221 + title={_(msg`Search is currently unavailable when logged out`)}> 222 + <Text style={[a.text_md, a.text_center, a.leading_snug]}> 223 + <Trans> 224 + <InlineLinkText 225 + label={_(msg`Sign in`)} 226 + to={'#'} 227 + onPress={showSignIn}> 228 + Sign in 229 + </InlineLinkText> 230 + <Text style={t.atoms.text_contrast_medium}> or </Text> 231 + <InlineLinkText 232 + label={_(msg`Create an account`)} 233 + to={'#'} 234 + onPress={showCreateAccount}> 235 + create an account 236 + </InlineLinkText> 237 + <Text> </Text> 238 + <Text style={t.atoms.text_contrast_medium}> 239 + to search for news, sports, politics, and everything else 240 + happening on Bluesky. 241 + </Text> 242 + </Trans> 243 + </Text> 244 + </SearchError> 245 + ) 246 + } 196 247 197 248 return ( 198 249 <>
+16 -27
src/screens/Moderation/index.tsx
··· 328 328 </Link> 329 329 </View> 330 330 331 - {declaredAge === undefined && ( 331 + {(!isDeclaredUnderage || declaredAge === undefined) && ( 332 + <Text 333 + style={[ 334 + a.pt_2xl, 335 + a.pb_md, 336 + a.text_md, 337 + a.font_semi_bold, 338 + t.atoms.text_contrast_high, 339 + ]}> 340 + <Trans>Content filters</Trans> 341 + </Text> 342 + )} 343 + 344 + {declaredAge === undefined ? ( 332 345 <> 333 - <Text 334 - style={[ 335 - a.pt_2xl, 336 - a.pb_md, 337 - a.text_md, 338 - a.font_semi_bold, 339 - t.atoms.text_contrast_high, 340 - ]}> 341 - <Trans>Content filters</Trans> 342 - </Text> 343 - 344 346 <Button 345 347 label={_(msg`Confirm your birthdate`)} 346 348 size="small" ··· 360 362 361 363 <BirthDateSettingsDialog control={birthdateDialogControl} /> 362 364 </> 363 - )} 364 - 365 - {!isDeclaredUnderage && ( 365 + ) : !isDeclaredUnderage ? ( 366 366 <> 367 - <Text 368 - style={[ 369 - a.pt_2xl, 370 - a.pb_md, 371 - a.text_md, 372 - a.font_semi_bold, 373 - t.atoms.text_contrast_high, 374 - ]}> 375 - <Trans>Content filters</Trans> 376 - </Text> 377 - 378 367 <AgeAssuranceAdmonition style={[a.pb_md]}> 379 368 <Trans> 380 369 You must complete age assurance in order to access the settings ··· 466 455 </View> 467 456 </View> 468 457 </> 469 - )} 458 + ) : null} 470 459 471 460 <Text 472 461 style={[