This commit is contained in:
Hailey
2024-06-07 12:47:27 -07:00
parent e98317d857
commit 0f95964646
5 changed files with 12 additions and 4 deletions
@@ -1,5 +1,5 @@
import React from 'react' import React from 'react'
import {View} from 'react-native' import {Keyboard, View} from 'react-native'
import {GeneratorView} from '@atproto/api/dist/client/types/app/bsky/feed/defs' import {GeneratorView} from '@atproto/api/dist/client/types/app/bsky/feed/defs'
import {msg, Trans} from '@lingui/macro' import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
@@ -24,6 +24,7 @@ export function WizardFeedCard({
const includesFeed = state.feeds.some(f => f.uri === generator.uri) const includesFeed = state.feeds.some(f => f.uri === generator.uri)
const onAdd = () => { const onAdd = () => {
Keyboard.dismiss()
if (includesFeed) { if (includesFeed) {
dispatch({type: 'RemoveFeed', feedUri: generator.uri}) dispatch({type: 'RemoveFeed', feedUri: generator.uri})
} else { } else {
@@ -1,5 +1,5 @@
import React from 'react' import React from 'react'
import {View} from 'react-native' import {Keyboard, View} from 'react-native'
import {AppBskyActorDefs} from '@atproto/api' import {AppBskyActorDefs} from '@atproto/api'
import {msg, Trans} from '@lingui/macro' import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
@@ -25,8 +25,9 @@ export function WizardProfileCard({
const includesProfile = state.profiles.some(p => p.did === profile.did) const includesProfile = state.profiles.some(p => p.did === profile.did)
const onPressAddRemove = () => { const onPressAddRemove = () => {
if (!profile?.did) return Keyboard.dismiss()
if (!profile?.did) return
if (!includesProfile) { if (!includesProfile) {
dispatch({type: 'AddProfile', profile}) dispatch({type: 'AddProfile', profile})
} else { } else {
@@ -73,6 +73,8 @@ export function StepFeeds() {
onEndReached={!query ? () => fetchNextPage() : undefined} onEndReached={!query ? () => fetchNextPage() : undefined}
onEndReachedThreshold={2} onEndReachedThreshold={2}
renderScrollComponent={props => <KeyboardAwareScrollView {...props} />} renderScrollComponent={props => <KeyboardAwareScrollView {...props} />}
keyboardShouldPersistTaps="handled"
keyboardDismissMode="on-drag"
containWeb={true} containWeb={true}
sideBorders={false} sideBorders={false}
style={{flex: 1}} style={{flex: 1}}
@@ -62,6 +62,8 @@ export function StepProfiles() {
onEndReached={!query ? () => fetchNextPage() : undefined} onEndReached={!query ? () => fetchNextPage() : undefined}
onEndReachedThreshold={2} onEndReachedThreshold={2}
renderScrollComponent={props => <KeyboardAwareScrollView {...props} />} renderScrollComponent={props => <KeyboardAwareScrollView {...props} />}
keyboardShouldPersistTaps="handled"
keyboardDismissMode="on-drag"
containWeb={true} containWeb={true}
sideBorders={false} sideBorders={false}
style={[a.flex_1]} style={[a.flex_1]}
+3 -1
View File
@@ -270,7 +270,9 @@ function Container({children}: {children: React.ReactNode}) {
} }
return ( return (
<KeyboardAwareScrollView style={[a.flex_1]}> <KeyboardAwareScrollView
style={[a.flex_1]}
keyboardShouldPersistTaps="handled">
{children} {children}
{state.currentStep === 'Details' && ( {state.currentStep === 'Details' && (
<Button <Button