android support

This commit is contained in:
Hailey
2024-10-02 08:56:42 -07:00
parent 5a60190796
commit d4b8401057
4 changed files with 29 additions and 24 deletions
+1 -1
View File
@@ -68,7 +68,7 @@
"@fortawesome/free-regular-svg-icons": "^6.1.1", "@fortawesome/free-regular-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1", "@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-native-fontawesome": "^0.3.2", "@fortawesome/react-native-fontawesome": "^0.3.2",
"@haileyok/bluesky-bottom-sheet": "^0.1.1-alpha.8", "@haileyok/bluesky-bottom-sheet": "^0.1.1-alpha.9",
"@haileyok/bluesky-video": "0.1.10", "@haileyok/bluesky-video": "0.1.10",
"@lingui/react": "^4.5.0", "@lingui/react": "^4.5.0",
"@mattermost/react-native-paste-input": "^0.7.1", "@mattermost/react-native-paste-input": "^0.7.1",
+6 -3
View File
@@ -1,12 +1,13 @@
import React, {useImperativeHandle} from 'react' import React, {useImperativeHandle} from 'react'
import {StyleProp, TextInput, View, ViewStyle} from 'react-native' import {StyleProp, TextInput, View, ViewStyle} from 'react-native'
import {GestureHandlerRootView, ScrollView} from 'react-native-gesture-handler'
import {useSafeAreaInsets} from 'react-native-safe-area-context' import {useSafeAreaInsets} from 'react-native-safe-area-context'
import {BlueskyBottomSheetView} from '@haileyok/bluesky-bottom-sheet' import {BlueskyBottomSheetView} from '@haileyok/bluesky-bottom-sheet'
import {logger} from '#/logger' import {logger} from '#/logger'
import {isIOS} from '#/platform/detection'
import {useDialogStateControlContext} from '#/state/dialogs' import {useDialogStateControlContext} from '#/state/dialogs'
import {List, ListMethods, ListProps} from '#/view/com/util/List' import {List, ListMethods, ListProps} from '#/view/com/util/List'
import {ScrollView} from '#/view/com/util/Views'
import {atoms as a, flatten, useTheme} from '#/alf' import {atoms as a, flatten, useTheme} from '#/alf'
import {Context} from '#/components/Dialog/context' import {Context} from '#/components/Dialog/context'
import { import {
@@ -112,6 +113,8 @@ export function OuterWithoutPortal({
const context = React.useMemo(() => ({close}), [close]) const context = React.useMemo(() => ({close}), [close])
const Wrapper = isIOS ? View : GestureHandlerRootView
return ( return (
<Context.Provider value={context}> <Context.Provider value={context}>
<BlueskyBottomSheetView <BlueskyBottomSheetView
@@ -126,9 +129,9 @@ export function OuterWithoutPortal({
}} }}
cornerRadius={20} cornerRadius={20}
{...nativeOptions}> {...nativeOptions}>
<View testID={testID} style={[t.atoms.bg]}> <Wrapper testID={testID} style={[t.atoms.bg]}>
{children} {children}
</View> </Wrapper>
</BlueskyBottomSheetView> </BlueskyBottomSheetView>
</Context.Provider> </Context.Provider>
) )
@@ -10,6 +10,7 @@ import {listUriToHref} from '#/lib/strings/url-helpers'
import {isNative} from '#/platform/detection' import {isNative} from '#/platform/detection'
import {useSession} from '#/state/session' import {useSession} from '#/state/session'
import {atoms as a, useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
import {BottomSheetInlineLinkText} from '#/components/BottomSheetLink'
import * as Dialog from '#/components/Dialog' import * as Dialog from '#/components/Dialog'
import {Divider} from '#/components/Divider' import {Divider} from '#/components/Divider'
import {InlineLinkText} from '#/components/Link' import {InlineLinkText} from '#/components/Link'
@@ -140,23 +141,24 @@ function ModerationDetailsDialogInner({
{modcause?.type === 'label' && ( {modcause?.type === 'label' && (
<View style={[a.pt_lg]}> <View style={[a.pt_lg]}>
<Divider /> <Divider />
<Text style={[t.atoms.text, a.text_md, a.leading_snug, a.mt_lg]}> {modcause.source.type === 'user' ? (
{modcause.source.type === 'user' ? ( <Text style={[t.atoms.text, a.text_md, a.leading_snug, a.mt_lg]}>
<Trans>This label was applied by the author.</Trans> <Trans>This label was applied by the author.</Trans>
) : ( </Text>
<Trans> ) : (
This label was applied by{' '} <>
<InlineLinkText <Text style={[t.atoms.text, a.text_md, a.leading_snug, a.mt_lg]}>
label={desc.source || _(msg`an unknown labeler`)} <Trans>This label was applied by </Trans>
to={makeProfileLink({did: modcause.label.src, handle: ''})} </Text>
onPress={() => control.close()} <BottomSheetInlineLinkText
style={a.text_md}> label={desc.source || _(msg`an unknown labeler`)}
{desc.source || _(msg`an unknown labeler`)} to={makeProfileLink({did: modcause.label.src, handle: ''})}
</InlineLinkText> onPress={() => control.close()}
. style={a.text_md}>
</Trans> {desc.source || _(msg`an unknown labeler`)}
)} </BottomSheetInlineLinkText>
</Text> </>
)}
</View> </View>
)} )}
+4 -4
View File
@@ -4120,10 +4120,10 @@
resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861"
integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==
"@haileyok/bluesky-bottom-sheet@^0.1.1-alpha.8": "@haileyok/bluesky-bottom-sheet@^0.1.1-alpha.9":
version "0.1.1-alpha.8" version "0.1.1-alpha.9"
resolved "https://registry.yarnpkg.com/@haileyok/bluesky-bottom-sheet/-/bluesky-bottom-sheet-0.1.1-alpha.8.tgz#c5fd503cdd5556a686a1f5c0974b1527fceda900" resolved "https://registry.yarnpkg.com/@haileyok/bluesky-bottom-sheet/-/bluesky-bottom-sheet-0.1.1-alpha.9.tgz#f23a9245d4fed5e1825222249f2ad64ec99896e6"
integrity sha512-305MSNscniLZpxd80QO4OCuMXkm+U/v/YW/x0fVQtBilVTikOOPIkiYge+kCUdryFPD3LU/GdrsQZL+y8qAiMQ== integrity sha512-duGQ/l20Mr/lmjS7lUu0T0QgARA/V47PrmpL7LZJMoK4IhSBHT4HMSjjOaBcSJhQg2I5/uSX3pShFzCfdGttVQ==
"@haileyok/bluesky-video@0.1.10": "@haileyok/bluesky-video@0.1.10":
version "0.1.10" version "0.1.10"