Merge branch 'main' into d/profile-screen
This commit is contained in:
+1
-1
@@ -3,6 +3,7 @@ import '#/view/icons'
|
||||
|
||||
import React, {useEffect, useState} from 'react'
|
||||
import {GestureHandlerRootView} from 'react-native-gesture-handler'
|
||||
import {KeyboardProvider as KeyboardControllerProvider} from 'react-native-keyboard-controller'
|
||||
import {
|
||||
initialWindowMetrics,
|
||||
SafeAreaProvider,
|
||||
@@ -14,7 +15,6 @@ import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import * as Sentry from '@sentry/react-native'
|
||||
|
||||
import {KeyboardControllerProvider} from '#/lib/hooks/useEnableKeyboardController'
|
||||
import {Provider as HideBottomBarBorderProvider} from '#/lib/hooks/useHideBottomBarBorder'
|
||||
import {QueryProvider} from '#/lib/react-query'
|
||||
import {s} from '#/lib/styles'
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
} from 'react-native'
|
||||
import {
|
||||
KeyboardAwareScrollView,
|
||||
type KeyboardAwareScrollViewRef,
|
||||
useKeyboardHandler,
|
||||
useReanimatedKeyboardAnimation,
|
||||
} from 'react-native-keyboard-controller'
|
||||
@@ -23,7 +24,6 @@ import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
|
||||
import {useEnableKeyboardController} from '#/lib/hooks/useEnableKeyboardController'
|
||||
import {ScrollProvider} from '#/lib/ScrollContext'
|
||||
import {logger} from '#/logger'
|
||||
import {useA11y} from '#/state/a11y'
|
||||
@@ -209,10 +209,9 @@ export const ScrollableInner = React.forwardRef<ScrollView, DialogInnerProps>(
|
||||
const {nativeSnapPoint, disableDrag, setDisableDrag} = useDialogContext()
|
||||
const insets = useSafeAreaInsets()
|
||||
|
||||
useEnableKeyboardController(IS_IOS)
|
||||
|
||||
const [keyboardHeight, setKeyboardHeight] = React.useState(0)
|
||||
|
||||
// note: iOS-only. keyboard-controller doesn't seem to work inside the sheets on Android
|
||||
useKeyboardHandler(
|
||||
{
|
||||
onEnd: e => {
|
||||
@@ -231,7 +230,6 @@ export const ScrollableInner = React.forwardRef<ScrollView, DialogInnerProps>(
|
||||
}
|
||||
paddingBottom = Math.max(paddingBottom, tokens.space._2xl)
|
||||
} else {
|
||||
paddingBottom += keyboardHeight
|
||||
if (nativeSnapPoint === BottomSheetSnapPoint.Full) {
|
||||
paddingBottom += insets.top
|
||||
}
|
||||
@@ -259,7 +257,7 @@ export const ScrollableInner = React.forwardRef<ScrollView, DialogInnerProps>(
|
||||
{paddingBottom},
|
||||
contentContainerStyle,
|
||||
]}
|
||||
ref={ref}
|
||||
ref={ref as React.Ref<KeyboardAwareScrollViewRef>}
|
||||
showsVerticalScrollIndicator={IS_ANDROID ? false : undefined}
|
||||
{...props}
|
||||
bounces={nativeSnapPoint === BottomSheetSnapPoint.Full}
|
||||
@@ -289,8 +287,6 @@ export const InnerFlatList = React.forwardRef<
|
||||
const insets = useSafeAreaInsets()
|
||||
const {nativeSnapPoint, disableDrag, setDisableDrag} = useDialogContext()
|
||||
|
||||
useEnableKeyboardController(IS_IOS)
|
||||
|
||||
const onScroll = (e: ScrollEvent) => {
|
||||
'worklet'
|
||||
if (!IS_ANDROID) {
|
||||
|
||||
@@ -58,7 +58,7 @@ export function VideoEmbedInnerNative({
|
||||
<BlueskyVideoView
|
||||
url={embed.playlist}
|
||||
autoplay={!autoplayDisabled && !isWithinMessage}
|
||||
beginMuted={isGif || autoplayDisabled ? false : muted}
|
||||
beginMuted={isGif || (autoplayDisabled ? false : muted)}
|
||||
style={[a.rounded_sm]}
|
||||
onActiveChange={e => {
|
||||
setIsActive(e.nativeEvent.isActive)
|
||||
@@ -67,7 +67,9 @@ export function VideoEmbedInnerNative({
|
||||
setIsLoading(e.nativeEvent.isLoading)
|
||||
}}
|
||||
onMutedChange={e => {
|
||||
setMuted(e.nativeEvent.isMuted)
|
||||
if (!isGif) {
|
||||
setMuted(e.nativeEvent.isMuted)
|
||||
}
|
||||
}}
|
||||
onStatusChange={e => {
|
||||
setStatus(e.nativeEvent.status)
|
||||
|
||||
@@ -28,7 +28,7 @@ export function VerifierDialog({
|
||||
verificationState: FullVerificationState
|
||||
}) {
|
||||
return (
|
||||
<Dialog.Outer control={control}>
|
||||
<Dialog.Outer control={control} nativeOptions={{preventExpansion: true}}>
|
||||
<Dialog.Handle />
|
||||
<Inner
|
||||
control={control}
|
||||
@@ -123,7 +123,6 @@ function Inner({
|
||||
}),
|
||||
)}
|
||||
size="small"
|
||||
variant="solid"
|
||||
color="primary"
|
||||
style={[a.justify_center]}
|
||||
onPress={() => {
|
||||
@@ -138,7 +137,6 @@ function Inner({
|
||||
<Button
|
||||
label={_(msg`Close dialog`)}
|
||||
size="small"
|
||||
variant="solid"
|
||||
color="secondary"
|
||||
onPress={() => {
|
||||
control.close()
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
import {
|
||||
createContext,
|
||||
useCallback,
|
||||
useContext,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useRef,
|
||||
} from 'react'
|
||||
import {
|
||||
KeyboardProvider,
|
||||
useKeyboardController,
|
||||
} from 'react-native-keyboard-controller'
|
||||
import {useFocusEffect} from '@react-navigation/native'
|
||||
|
||||
const KeyboardControllerRefCountContext = createContext<{
|
||||
incrementRefCount: () => void
|
||||
decrementRefCount: () => void
|
||||
}>({
|
||||
incrementRefCount: () => {},
|
||||
decrementRefCount: () => {},
|
||||
})
|
||||
KeyboardControllerRefCountContext.displayName =
|
||||
'KeyboardControllerRefCountContext'
|
||||
|
||||
export function KeyboardControllerProvider({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<KeyboardProvider enabled={false} preload={false}>
|
||||
<KeyboardControllerProviderInner>
|
||||
{children}
|
||||
</KeyboardControllerProviderInner>
|
||||
</KeyboardProvider>
|
||||
)
|
||||
}
|
||||
|
||||
function KeyboardControllerProviderInner({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
const {setEnabled} = useKeyboardController()
|
||||
const refCount = useRef(0)
|
||||
|
||||
const value = useMemo(
|
||||
() => ({
|
||||
incrementRefCount: () => {
|
||||
refCount.current++
|
||||
setEnabled(refCount.current > 0)
|
||||
},
|
||||
decrementRefCount: () => {
|
||||
refCount.current--
|
||||
setEnabled(refCount.current > 0)
|
||||
|
||||
if (__DEV__ && refCount.current < 0) {
|
||||
console.error('KeyboardController ref count < 0')
|
||||
}
|
||||
},
|
||||
}),
|
||||
[setEnabled],
|
||||
)
|
||||
|
||||
return (
|
||||
<KeyboardControllerRefCountContext.Provider value={value}>
|
||||
{children}
|
||||
</KeyboardControllerRefCountContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
export function useEnableKeyboardController(shouldEnable: boolean) {
|
||||
const {incrementRefCount, decrementRefCount} = useContext(
|
||||
KeyboardControllerRefCountContext,
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
if (!shouldEnable) {
|
||||
return
|
||||
}
|
||||
incrementRefCount()
|
||||
return () => {
|
||||
decrementRefCount()
|
||||
}
|
||||
}, [shouldEnable, incrementRefCount, decrementRefCount])
|
||||
}
|
||||
|
||||
/**
|
||||
* Like `useEnableKeyboardController`, but using `useFocusEffect`
|
||||
*/
|
||||
export function useEnableKeyboardControllerScreen(shouldEnable: boolean) {
|
||||
const {incrementRefCount, decrementRefCount} = useContext(
|
||||
KeyboardControllerRefCountContext,
|
||||
)
|
||||
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
if (!shouldEnable) {
|
||||
return
|
||||
}
|
||||
incrementRefCount()
|
||||
return () => {
|
||||
decrementRefCount()
|
||||
}
|
||||
}, [shouldEnable, incrementRefCount, decrementRefCount]),
|
||||
)
|
||||
}
|
||||
@@ -129,7 +129,7 @@ msgstr ""
|
||||
|
||||
#. Number of users (always at least 25) who have joined Bluesky using a specific starter pack
|
||||
#: src/screens/StarterPack/StarterPackScreen.tsx:499
|
||||
msgid "{0, plural, other {# people have}} used this starter pack!"
|
||||
msgid "{0, plural, other {# people have}} joined Bluesky via this starter pack!"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/dialogs/StarterPackDialog.tsx:361
|
||||
@@ -242,7 +242,7 @@ msgid "{DISPLAY_NAME_MAX_GRAPHEMES, plural, other {Display name is too long. The
|
||||
msgstr ""
|
||||
|
||||
#: src/lib/generate-starterpack.ts:104
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:202
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:199
|
||||
msgid "{displayName}'s Starter Pack"
|
||||
msgstr ""
|
||||
|
||||
@@ -475,12 +475,12 @@ msgstr ""
|
||||
msgid "+{computedTotal}"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:525
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:522
|
||||
msgctxt "profiles"
|
||||
msgid "<0>{0}, </0><1>{1}, </1>and {2, plural, one {# other} other {# others}} are included in your starter pack"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:578
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:575
|
||||
msgctxt "feeds"
|
||||
msgid "<0>{0}, </0><1>{1}, </1>and {2, plural, one {# other} other {# others}} are included in your starter pack"
|
||||
msgstr ""
|
||||
@@ -493,12 +493,12 @@ msgstr ""
|
||||
msgid "<0>{0}</0> {1, plural, one {following} other {following}}"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:512
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:566
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:509
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:563
|
||||
msgid "<0>{0}</0> and<1> </1><2>{1} </2>are included in your starter pack"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:559
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:556
|
||||
msgid "<0>{0}</0> is included in your starter pack"
|
||||
msgstr ""
|
||||
|
||||
@@ -515,7 +515,7 @@ msgstr ""
|
||||
msgid "<0>Sign in</0><1> or </1><2>create an account</2><3> </3><4>to search for news, sports, politics, and everything else happening on Bluesky.</4>"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:503
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:500
|
||||
msgid "<0>You</0> and<1> </1><2>{0} </2>are included in your starter pack"
|
||||
msgstr ""
|
||||
|
||||
@@ -581,7 +581,7 @@ msgstr ""
|
||||
|
||||
#. Contains a post that originally appeared in English. Consider translating the post text if it makes sense in your language, and noting that the post was translated from English.
|
||||
#: src/components/dialogs/nuxs/DraftsAnnouncement.tsx:97
|
||||
msgid "A screenshot of a the post composer with a new button next to the post button that says \"Drafts\", with a rainbow firework effect. Below, the text in the composer reads \"Hey, did you hear the news? Bluesky has drafts now???\"."
|
||||
msgid "A screenshot of the post composer with a new button next to the post button that says \"Drafts\", with a rainbow firework effect. Below, the text in the composer reads \"Hey, did you hear the news? Bluesky has drafts now!!!\"."
|
||||
msgstr ""
|
||||
|
||||
#: src/Navigation.tsx:535
|
||||
@@ -710,7 +710,7 @@ msgstr ""
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:614
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:611
|
||||
msgid "Add {0} more to continue"
|
||||
msgstr ""
|
||||
|
||||
@@ -742,8 +742,8 @@ msgstr ""
|
||||
#: src/view/com/composer/GifAltText.tsx:211
|
||||
#: src/view/com/composer/photos/Gallery.tsx:170
|
||||
#: src/view/com/composer/photos/Gallery.tsx:217
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:88
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:93
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:98
|
||||
msgid "Add alt text"
|
||||
msgstr ""
|
||||
|
||||
@@ -819,7 +819,7 @@ msgstr ""
|
||||
msgid "Add recommended feeds"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:547
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:544
|
||||
msgid "Add some feeds to your starter pack!"
|
||||
msgstr ""
|
||||
|
||||
@@ -1029,7 +1029,7 @@ msgstr ""
|
||||
|
||||
#: src/screens/Settings/AccessibilitySettings.tsx:54
|
||||
#: src/view/com/composer/GifAltText.tsx:154
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:117
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:122
|
||||
#: src/view/com/composer/videos/SubtitleDialog.tsx:40
|
||||
#: src/view/com/composer/videos/SubtitleDialog.tsx:58
|
||||
#: src/view/com/composer/videos/SubtitleDialog.tsx:109
|
||||
@@ -1050,7 +1050,7 @@ msgid "Alt text must be less than {MAX_ALT_TEXT} characters."
|
||||
msgstr ""
|
||||
|
||||
#: src/view/com/composer/GifAltText.tsx:179
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:138
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:143
|
||||
msgid "Alt text will be truncated. {MAX_ALT_TEXT, plural, other {Limit: {0} characters.}}"
|
||||
msgstr ""
|
||||
|
||||
@@ -1277,12 +1277,12 @@ msgctxt "toast"
|
||||
msgid "Appeal submitted"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Takendown.tsx:114
|
||||
#: src/screens/Takendown.tsx:142
|
||||
#: src/screens/Takendown.tsx:113
|
||||
#: src/screens/Takendown.tsx:139
|
||||
msgid "Appeal suspension"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Takendown.tsx:117
|
||||
#: src/screens/Takendown.tsx:116
|
||||
msgid "Appeal Suspension"
|
||||
msgstr ""
|
||||
|
||||
@@ -1408,7 +1408,7 @@ msgstr ""
|
||||
#: src/screens/Settings/components/ChangePasswordDialog.tsx:272
|
||||
#: src/screens/Settings/components/ChangePasswordDialog.tsx:281
|
||||
#: src/screens/Signup/BackNextButtons.tsx:41
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:324
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:321
|
||||
#: src/view/com/composer/drafts/DraftsListDialog.tsx:80
|
||||
#: src/view/com/composer/drafts/DraftsListDialog.tsx:86
|
||||
msgid "Back"
|
||||
@@ -1453,7 +1453,7 @@ msgstr ""
|
||||
#: src/components/dms/dialogs/NewChatDialog.tsx:55
|
||||
#: src/components/dms/MessageProfileButton.tsx:59
|
||||
#: src/screens/Messages/ChatList.tsx:371
|
||||
#: src/screens/Messages/Conversation.tsx:228
|
||||
#: src/screens/Messages/Conversation.tsx:225
|
||||
msgid "Before you can message another user, you must first verify your email."
|
||||
msgstr ""
|
||||
|
||||
@@ -1617,7 +1617,7 @@ msgstr ""
|
||||
msgid "Bluesky is more fun with friends. Do you want to invite some of yours? <0/>"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Takendown.tsx:215
|
||||
#: src/screens/Takendown.tsx:212
|
||||
msgid "Bluesky Social Terms of Service"
|
||||
msgstr ""
|
||||
|
||||
@@ -1788,8 +1788,8 @@ msgstr ""
|
||||
#: src/screens/Settings/components/ChangePasswordDialog.tsx:247
|
||||
#: src/screens/Settings/components/ChangePasswordDialog.tsx:253
|
||||
#: src/screens/Settings/Settings.tsx:305
|
||||
#: src/screens/Takendown.tsx:102
|
||||
#: src/screens/Takendown.tsx:105
|
||||
#: src/screens/Takendown.tsx:101
|
||||
#: src/screens/Takendown.tsx:104
|
||||
#: src/view/com/composer/Composer.tsx:1449
|
||||
#: src/view/com/composer/Composer.tsx:1461
|
||||
#: src/view/com/composer/photos/EditImageDialog.web.tsx:43
|
||||
@@ -1987,7 +1987,7 @@ msgstr ""
|
||||
msgid "Choose domain verification method"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:218
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:215
|
||||
msgid "Choose Feeds"
|
||||
msgstr ""
|
||||
|
||||
@@ -1995,7 +1995,7 @@ msgstr ""
|
||||
msgid "Choose for me"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:214
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:211
|
||||
msgid "Choose People"
|
||||
msgstr ""
|
||||
|
||||
@@ -2119,7 +2119,7 @@ msgstr ""
|
||||
#: src/components/StarterPack/Wizard/WizardEditListDialog.tsx:118
|
||||
#: src/components/StarterPack/Wizard/WizardEditListDialog.tsx:124
|
||||
#: src/components/verification/VerificationsDialog.tsx:145
|
||||
#: src/components/verification/VerifierDialog.tsx:147
|
||||
#: src/components/verification/VerifierDialog.tsx:145
|
||||
#: src/components/WhoCanReply.tsx:235
|
||||
#: src/components/WhoCanReply.tsx:242
|
||||
#: src/screens/Settings/components/ChangePasswordDialog.tsx:287
|
||||
@@ -2147,7 +2147,7 @@ msgstr ""
|
||||
#: src/components/ageAssurance/AgeAssuranceInitDialog.tsx:228
|
||||
#: src/components/dialogs/GifSelect.tsx:263
|
||||
#: src/components/verification/VerificationsDialog.tsx:137
|
||||
#: src/components/verification/VerifierDialog.tsx:139
|
||||
#: src/components/verification/VerifierDialog.tsx:138
|
||||
#: src/view/com/composer/select-language/PostLanguageSelectDialog.tsx:204
|
||||
#: src/view/com/composer/select-language/PostLanguageSelectDialog.tsx:298
|
||||
#: src/view/com/composer/select-language/PostLanguageSelectDialog.tsx:330
|
||||
@@ -2433,7 +2433,7 @@ msgstr ""
|
||||
msgid "Continue to next step"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Messages/Conversation.tsx:57
|
||||
#: src/screens/Messages/Conversation.tsx:56
|
||||
msgid "Conversation"
|
||||
msgstr ""
|
||||
|
||||
@@ -2926,7 +2926,7 @@ msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/com/composer/GifAltText.tsx:150
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:113
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:118
|
||||
msgid "Descriptive alt text"
|
||||
msgstr ""
|
||||
|
||||
@@ -3040,7 +3040,7 @@ msgstr ""
|
||||
msgid "Discover New Feeds"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/Dialog/index.tsx:379
|
||||
#: src/components/Dialog/index.tsx:375
|
||||
msgid "Dismiss"
|
||||
msgstr ""
|
||||
|
||||
@@ -3159,7 +3159,7 @@ msgstr ""
|
||||
msgid "Double tap or long press the message to add a reaction"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/Dialog/index.tsx:380
|
||||
#: src/components/Dialog/index.tsx:376
|
||||
msgid "Double tap to close the dialog"
|
||||
msgstr ""
|
||||
|
||||
@@ -3238,8 +3238,8 @@ msgstr ""
|
||||
#: src/screens/Settings/AccountSettings.tsx:145
|
||||
#: src/screens/Settings/NotificationSettings/ActivityNotificationSettings.tsx:252
|
||||
#: src/screens/StarterPack/StarterPackScreen.tsx:598
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:340
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:345
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:337
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:342
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
@@ -3726,8 +3726,8 @@ msgstr ""
|
||||
msgid "Failed to create conversation"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:263
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:271
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:260
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:268
|
||||
msgid "Failed to create starter pack"
|
||||
msgstr ""
|
||||
|
||||
@@ -4098,7 +4098,7 @@ msgstr ""
|
||||
msgid "Finding friends..."
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:219
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:216
|
||||
msgid "Finish"
|
||||
msgstr ""
|
||||
|
||||
@@ -5118,11 +5118,11 @@ msgstr ""
|
||||
msgid "It's correct"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:492
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:489
|
||||
msgid "It's just <0>{0} </0>right now! Add more people to your starter pack by searching above."
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:487
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:484
|
||||
msgid "It's just you right now! Add more people to your starter pack by searching above."
|
||||
msgstr ""
|
||||
|
||||
@@ -5219,7 +5219,7 @@ msgid "Latest"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/verification/VerificationsDialog.tsx:167
|
||||
#: src/components/verification/VerifierDialog.tsx:135
|
||||
#: src/components/verification/VerifierDialog.tsx:134
|
||||
#: src/screens/Moderation/VerificationSettings.tsx:49
|
||||
#: src/screens/Profile/Header/EditProfileDialog.tsx:349
|
||||
#: src/screens/Settings/components/ChangeHandleDialog.tsx:213
|
||||
@@ -6140,10 +6140,10 @@ msgstr ""
|
||||
#: src/screens/Settings/components/AddAppPasswordDialog.tsx:157
|
||||
#: src/screens/Settings/components/AddAppPasswordDialog.tsx:165
|
||||
#: src/screens/Signup/BackNextButtons.tsx:67
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:211
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:215
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:393
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:400
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:208
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:212
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:390
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:397
|
||||
msgid "Next"
|
||||
msgstr ""
|
||||
|
||||
@@ -6355,7 +6355,7 @@ msgstr ""
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/FindContactsFlowScreen.tsx:70
|
||||
#: src/screens/FindContactsFlowScreen.tsx:67
|
||||
#: src/screens/Settings/FindContactsSettings.tsx:103
|
||||
msgid "Not available on this platform."
|
||||
msgstr ""
|
||||
@@ -7138,7 +7138,7 @@ msgstr ""
|
||||
msgid "Please use the native app to import your contacts."
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/FindContactsFlowScreen.tsx:71
|
||||
#: src/screens/FindContactsFlowScreen.tsx:68
|
||||
msgid "Please use the native app to sync your contacts."
|
||||
msgstr ""
|
||||
|
||||
@@ -7556,8 +7556,8 @@ msgstr ""
|
||||
msgid "Real people."
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Takendown.tsx:160
|
||||
#: src/screens/Takendown.tsx:168
|
||||
#: src/screens/Takendown.tsx:157
|
||||
#: src/screens/Takendown.tsx:165
|
||||
msgid "Reason for appeal"
|
||||
msgstr ""
|
||||
|
||||
@@ -8132,7 +8132,7 @@ msgstr ""
|
||||
msgid "Returns to previous page"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:325
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:322
|
||||
msgid "Returns to the previous step"
|
||||
msgstr ""
|
||||
|
||||
@@ -8152,8 +8152,8 @@ msgstr ""
|
||||
#: src/view/com/composer/GifAltText.tsx:202
|
||||
#: src/view/com/composer/photos/EditImageDialog.web.tsx:62
|
||||
#: src/view/com/composer/photos/EditImageDialog.web.tsx:75
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:152
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:162
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:157
|
||||
#: src/view/com/composer/photos/ImageAltTextDialog.tsx:167
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
@@ -8305,7 +8305,7 @@ msgstr ""
|
||||
msgid "Search for \"{searchText}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:550
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:547
|
||||
msgid "Search for feeds that you want to suggest to others."
|
||||
msgstr ""
|
||||
|
||||
@@ -9001,14 +9001,14 @@ msgstr ""
|
||||
#: src/screens/Settings/Settings.tsx:304
|
||||
#: src/screens/SignupQueued.tsx:93
|
||||
#: src/screens/SignupQueued.tsx:96
|
||||
#: src/screens/Takendown.tsx:88
|
||||
#: src/screens/Takendown.tsx:87
|
||||
#: src/view/shell/desktop/LeftNav.tsx:212
|
||||
#: src/view/shell/desktop/LeftNav.tsx:269
|
||||
#: src/view/shell/desktop/LeftNav.tsx:272
|
||||
msgid "Sign out"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Takendown.tsx:91
|
||||
#: src/screens/Takendown.tsx:90
|
||||
msgid "Sign Out"
|
||||
msgstr ""
|
||||
|
||||
@@ -9035,7 +9035,7 @@ msgstr ""
|
||||
#: src/screens/Onboarding/StepFinished/index.tsx:316
|
||||
#: src/screens/Onboarding/StepSuggestedAccounts/index.tsx:261
|
||||
#: src/screens/Onboarding/StepSuggestedStarterpacks/index.tsx:104
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:219
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:216
|
||||
msgid "Skip"
|
||||
msgstr ""
|
||||
|
||||
@@ -9098,7 +9098,7 @@ msgstr ""
|
||||
msgid "Something wasn't quite right with the data you're trying to report. Please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Messages/Conversation.tsx:144
|
||||
#: src/screens/Messages/Conversation.tsx:141
|
||||
msgid "Something went wrong"
|
||||
msgstr ""
|
||||
|
||||
@@ -9194,7 +9194,7 @@ msgstr ""
|
||||
|
||||
#: src/Navigation.tsx:590
|
||||
#: src/Navigation.tsx:595
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:210
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:207
|
||||
msgid "Starter Pack"
|
||||
msgstr ""
|
||||
|
||||
@@ -9270,11 +9270,11 @@ msgstr ""
|
||||
msgid "Submit"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Takendown.tsx:76
|
||||
#: src/screens/Takendown.tsx:75
|
||||
msgid "Submit appeal"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Takendown.tsx:80
|
||||
#: src/screens/Takendown.tsx:79
|
||||
msgid "Submit Appeal"
|
||||
msgstr ""
|
||||
|
||||
@@ -9505,8 +9505,8 @@ msgstr ""
|
||||
#: src/screens/StarterPack/StarterPackScreen.tsx:113
|
||||
#: src/screens/StarterPack/StarterPackScreen.tsx:157
|
||||
#: src/screens/StarterPack/StarterPackScreen.tsx:158
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:117
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:127
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:116
|
||||
#: src/screens/StarterPack/Wizard/index.tsx:126
|
||||
msgid "That starter pack could not be found."
|
||||
msgstr ""
|
||||
|
||||
@@ -10970,7 +10970,7 @@ msgstr ""
|
||||
msgid "We couldn't find any results for that topic."
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Messages/Conversation.tsx:145
|
||||
#: src/screens/Messages/Conversation.tsx:142
|
||||
msgid "We couldn't load this conversation"
|
||||
msgstr ""
|
||||
|
||||
@@ -11191,7 +11191,7 @@ msgstr ""
|
||||
msgid "Whoops! Trending videos failed to load."
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Takendown.tsx:171
|
||||
#: src/screens/Takendown.tsx:168
|
||||
msgid "Why are you appealing?"
|
||||
msgstr ""
|
||||
|
||||
@@ -11751,7 +11751,7 @@ msgstr ""
|
||||
msgid "Your account has been deleted"
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Takendown.tsx:144
|
||||
#: src/screens/Takendown.tsx:141
|
||||
msgid "Your account has been suspended"
|
||||
msgstr ""
|
||||
|
||||
@@ -11763,11 +11763,11 @@ msgstr ""
|
||||
msgid "Your account repository, containing all public data records, can be downloaded as a \"CAR\" file. This file does not include media embeds, such as images, or your private data, which must be fetched separately."
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Takendown.tsx:212
|
||||
#: src/screens/Takendown.tsx:209
|
||||
msgid "Your account was found to be in violation of the <0>Bluesky Social Terms of Service</0>. You have been sent an email outlining the specific violation and suspension period, if applicable. You can appeal this decision if you believe it was made in error."
|
||||
msgstr ""
|
||||
|
||||
#: src/screens/Takendown.tsx:152
|
||||
#: src/screens/Takendown.tsx:149
|
||||
msgid "Your appeal has been submitted. If your appeal succeeds, you will receive an email."
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {usePreventRemove} from '@react-navigation/native'
|
||||
|
||||
import {useEnableKeyboardControllerScreen} from '#/lib/hooks/useEnableKeyboardController'
|
||||
import {
|
||||
type AllNavigatorParams,
|
||||
type NativeStackScreenProps,
|
||||
@@ -37,8 +36,6 @@ export function FindContactsFlowScreen({navigation}: Props) {
|
||||
})
|
||||
})
|
||||
|
||||
useEnableKeyboardControllerScreen(true)
|
||||
|
||||
const setMinimalShellMode = useSetMinimalShellMode()
|
||||
const effect = useCallback(() => {
|
||||
setMinimalShellMode(true)
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
} from '@react-navigation/native'
|
||||
import {type NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||
|
||||
import {useEnableKeyboardControllerScreen} from '#/lib/hooks/useEnableKeyboardController'
|
||||
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
|
||||
import {
|
||||
type CommonNavigatorParams,
|
||||
@@ -68,8 +67,6 @@ export function MessagesConversationScreenInner({route}: Props) {
|
||||
const convoId = route.params.conversation
|
||||
const {setCurrentConvoId} = useCurrentConvoId()
|
||||
|
||||
useEnableKeyboardControllerScreen(true)
|
||||
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
setCurrentConvoId(convoId)
|
||||
|
||||
@@ -2,7 +2,6 @@ import {useMemo, useReducer} from 'react'
|
||||
import {View} from 'react-native'
|
||||
import * as bcp47Match from 'bcp-47-match'
|
||||
|
||||
import {useEnableKeyboardControllerScreen} from '#/lib/hooks/useEnableKeyboardController'
|
||||
import {useLanguagePrefs} from '#/state/preferences'
|
||||
import {
|
||||
Layout,
|
||||
@@ -60,8 +59,6 @@ export function Onboarding() {
|
||||
)
|
||||
const [contactsFlowState, contactsFlowDispatch] = useFindContactsFlowState()
|
||||
|
||||
useEnableKeyboardControllerScreen(true)
|
||||
|
||||
return (
|
||||
<Portal>
|
||||
<View style={[a.absolute, a.inset_0, t.atoms.bg]}>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {useCallback, useMemo, useRef} from 'react'
|
||||
import {useCallback, useMemo, useRef, useState} from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {useAnimatedRef} from 'react-native-reanimated'
|
||||
import {
|
||||
@@ -35,12 +35,13 @@ import {PagerWithHeader} from '#/view/com/pager/PagerWithHeader'
|
||||
import {FAB} from '#/view/com/util/fab/FAB'
|
||||
import {type ListRef} from '#/view/com/util/List'
|
||||
import {ListHiddenScreen} from '#/screens/List/ListHiddenScreen'
|
||||
import {atoms as a, platform} from '#/alf'
|
||||
import {atoms as a, native, platform, useTheme} from '#/alf'
|
||||
import {useDialogControl} from '#/components/Dialog'
|
||||
import {ListAddRemoveUsersDialog} from '#/components/dialogs/lists/ListAddRemoveUsersDialog'
|
||||
import * as Layout from '#/components/Layout'
|
||||
import {Loader} from '#/components/Loader'
|
||||
import * as Hider from '#/components/moderation/Hider'
|
||||
import {IS_WEB} from '#/env'
|
||||
import {AboutSection} from './AboutSection'
|
||||
import {ErrorScreen} from './components/ErrorScreen'
|
||||
import {Header} from './components/Header'
|
||||
@@ -149,6 +150,7 @@ function ProfileListScreenLoaded({
|
||||
moderationOpts: ModerationOpts
|
||||
preferences: UsePreferencesQueryResponse
|
||||
}) {
|
||||
const t = useTheme()
|
||||
const {_} = useLingui()
|
||||
const queryClient = useQueryClient()
|
||||
const {openComposer} = useOpenComposer()
|
||||
@@ -164,6 +166,8 @@ function ProfileListScreenLoaded({
|
||||
const scrollElRef = useAnimatedRef()
|
||||
const addUserDialogControl = useDialogControl()
|
||||
const sectionTitlesCurate = [_(msg`Posts`), _(msg`People`)]
|
||||
// modlist only
|
||||
const [headerHeight, setHeaderHeight] = useState<number | null>(null)
|
||||
|
||||
const moderation = useMemo(() => {
|
||||
return moderateUserList(list, moderationOpts)
|
||||
@@ -263,13 +267,24 @@ function ProfileListScreenLoaded({
|
||||
</Hider.Mask>
|
||||
<Hider.Content>
|
||||
<View style={[a.util_screen_outer]}>
|
||||
<Layout.Center>{renderHeader()}</Layout.Center>
|
||||
<AboutSection
|
||||
list={list}
|
||||
scrollElRef={scrollElRef as ListRef}
|
||||
onPressAddUser={addUserDialogControl.open}
|
||||
headerHeight={0}
|
||||
/>
|
||||
<Layout.Center
|
||||
onLayout={evt => setHeaderHeight(evt.nativeEvent.layout.height)}
|
||||
style={[
|
||||
native([a.absolute, a.z_10, t.atoms.bg]),
|
||||
|
||||
a.border_b,
|
||||
t.atoms.border_contrast_low,
|
||||
]}>
|
||||
{renderHeader()}
|
||||
</Layout.Center>
|
||||
{headerHeight !== null && (
|
||||
<AboutSection
|
||||
list={list}
|
||||
scrollElRef={scrollElRef as ListRef}
|
||||
onPressAddUser={addUserDialogControl.open}
|
||||
headerHeight={IS_WEB ? 0 : headerHeight}
|
||||
/>
|
||||
)}
|
||||
<FAB
|
||||
testID="composeFAB"
|
||||
onPress={() => openComposer({logContext: 'Fab'})}
|
||||
|
||||
@@ -16,7 +16,6 @@ import {useFocusEffect, useNavigation} from '@react-navigation/native'
|
||||
import {type NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||
|
||||
import {STARTER_PACK_MAX_SIZE} from '#/lib/constants'
|
||||
import {useEnableKeyboardControllerScreen} from '#/lib/hooks/useEnableKeyboardController'
|
||||
import {createSanitizedDisplayName} from '#/lib/moderation/create-sanitized-display-name'
|
||||
import {
|
||||
type CommonNavigatorParams,
|
||||
@@ -185,8 +184,6 @@ function WizardInner({
|
||||
})
|
||||
}, [navigation])
|
||||
|
||||
useEnableKeyboardControllerScreen(true)
|
||||
|
||||
useFocusEffect(
|
||||
React.useCallback(() => {
|
||||
setMinimalShellMode(true)
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
BLUESKY_MOD_SERVICE_HEADERS,
|
||||
MAX_REPORT_REASON_GRAPHEME_LENGTH,
|
||||
} from '#/lib/constants'
|
||||
import {useEnableKeyboardController} from '#/lib/hooks/useEnableKeyboardController'
|
||||
import {cleanError} from '#/lib/strings/errors'
|
||||
import {useAgent, useSession, useSessionApi} from '#/state/session'
|
||||
import {CharProgress} from '#/view/com/composer/char-progress/CharProgress'
|
||||
@@ -121,8 +120,6 @@ export function Takendown() {
|
||||
|
||||
const webLayout = IS_WEB && gtMobile
|
||||
|
||||
useEnableKeyboardController(true)
|
||||
|
||||
return (
|
||||
<View style={[a.util_screen_outer, a.flex_1]}>
|
||||
<KeyboardAwareScrollView style={[a.flex_1, t.atoms.bg]} centerContent>
|
||||
|
||||
@@ -200,7 +200,13 @@ export function useSetFeedViewPreferencesMutation() {
|
||||
})
|
||||
}
|
||||
|
||||
export function useSetThreadViewPreferencesMutation() {
|
||||
export function useSetThreadViewPreferencesMutation({
|
||||
onSuccess,
|
||||
onError,
|
||||
}: {
|
||||
onSuccess?: (data: void, variables: Partial<ThreadViewPreferences>) => void
|
||||
onError?: (error: unknown) => void
|
||||
}) {
|
||||
const queryClient = useQueryClient()
|
||||
const agent = useAgent()
|
||||
|
||||
@@ -212,6 +218,8 @@ export function useSetThreadViewPreferencesMutation() {
|
||||
queryKey: preferencesQueryKey,
|
||||
})
|
||||
},
|
||||
onSuccess,
|
||||
onError,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {useCallback, useMemo, useRef, useState} from 'react'
|
||||
import {type AppBskyUnspeccedGetPostThreadV2} from '@atproto/api'
|
||||
import {useFocusEffect} from '@react-navigation/native'
|
||||
import debounce from 'lodash.debounce'
|
||||
|
||||
import {useCallOnce} from '#/lib/once'
|
||||
@@ -70,26 +71,37 @@ export function useThreadPreferences({
|
||||
}
|
||||
|
||||
const userUpdatedPrefs = useRef(false)
|
||||
const [isSaving, setIsSaving] = useState(false)
|
||||
const {mutateAsync} = useSetThreadViewPreferencesMutation()
|
||||
const {mutate, isPending: isSaving} = useSetThreadViewPreferencesMutation({
|
||||
onSuccess: (_data, prefs) => {
|
||||
ax.metric('thread:preferences:update', {
|
||||
sort: prefs.sort,
|
||||
view: prefs.lab_treeViewEnabled ? 'tree' : 'linear',
|
||||
})
|
||||
},
|
||||
onError: err => {
|
||||
ax.logger.error('useThreadPreferences failed to save', {
|
||||
safeMessage: err,
|
||||
})
|
||||
},
|
||||
})
|
||||
const savePrefs = useMemo(() => {
|
||||
return debounce(async (prefs: ThreadViewPreferences) => {
|
||||
try {
|
||||
setIsSaving(true)
|
||||
await mutateAsync(prefs)
|
||||
ax.metric('thread:preferences:update', {
|
||||
sort: prefs.sort,
|
||||
view: prefs.lab_treeViewEnabled ? 'tree' : 'linear',
|
||||
})
|
||||
} catch (e) {
|
||||
ax.logger.error('useThreadPreferences failed to save', {
|
||||
safeMessage: e,
|
||||
})
|
||||
} finally {
|
||||
setIsSaving(false)
|
||||
return debounce(
|
||||
(prefs: ThreadViewPreferences) => {
|
||||
mutate(prefs)
|
||||
},
|
||||
2e3,
|
||||
{leading: true, trailing: true},
|
||||
)
|
||||
}, [mutate])
|
||||
|
||||
// flush on leave screen
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
return () => {
|
||||
void savePrefs.flush()
|
||||
}
|
||||
}, 4e3)
|
||||
}, [mutateAsync])
|
||||
}, [savePrefs]),
|
||||
)
|
||||
|
||||
if (save && userUpdatedPrefs.current) {
|
||||
savePrefs({
|
||||
|
||||
@@ -5,6 +5,7 @@ import {msg, Plural, Trans} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
|
||||
import {MAX_ALT_TEXT} from '#/lib/constants'
|
||||
import {useIsKeyboardVisible} from '#/lib/hooks/useIsKeyboardVisible'
|
||||
import {enforceLen} from '#/lib/strings/helpers'
|
||||
import {type ComposerImage} from '#/state/gallery'
|
||||
import {AltTextCounterWrapper} from '#/view/com/composer/AltTextCounterWrapper'
|
||||
@@ -28,6 +29,7 @@ export const ImageAltTextDialog = ({
|
||||
image,
|
||||
onChange,
|
||||
}: Props): React.ReactNode => {
|
||||
const {height: minHeight} = useWindowDimensions()
|
||||
const [altText, setAltText] = React.useState(image.alt)
|
||||
|
||||
return (
|
||||
@@ -38,7 +40,8 @@ export const ImageAltTextDialog = ({
|
||||
...image,
|
||||
alt: enforceLen(altText, MAX_ALT_TEXT, true),
|
||||
})
|
||||
}}>
|
||||
}}
|
||||
nativeOptions={{minHeight}}>
|
||||
<Dialog.Handle />
|
||||
<ImageAltTextInner
|
||||
control={control}
|
||||
@@ -65,6 +68,8 @@ const ImageAltTextInner = ({
|
||||
const t = useTheme()
|
||||
const windim = useWindowDimensions()
|
||||
|
||||
const [isKeyboardVisible] = useIsKeyboardVisible()
|
||||
|
||||
const imageStyle = React.useMemo<ImageStyle>(() => {
|
||||
const maxWidth = IS_WEB ? 450 : windim.width
|
||||
const source = image.transformed ?? image.source
|
||||
@@ -165,7 +170,7 @@ const ImageAltTextInner = ({
|
||||
</AltTextCounterWrapper>
|
||||
</View>
|
||||
{/* Maybe fix this later -h */}
|
||||
{IS_ANDROID ? <View style={{height: 300}} /> : null}
|
||||
{IS_ANDROID && isKeyboardVisible ? <View style={{height: 300}} /> : null}
|
||||
</Dialog.ScrollableInner>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user