Skip to content

Commit 63d6d9c

Browse files
authored
feat: Profile Keyboard auto-scrolling (#1634)
1 parent 555c5e7 commit 63d6d9c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

features/profiles/profile-me.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { useCurrentSender } from "../authentication/multi-inbox.store";
2525
import { TextField } from "@/design-system/TextField/TextField";
2626
import { VStack } from "@/design-system/VStack";
2727
import { Text } from "@/design-system/Text";
28+
import { useSafeAreaInsets } from "react-native-safe-area-context";
2829

2930
export function ProfileMe(props: { inboxId: InboxId }) {
3031
const { inboxId } = props;
@@ -35,6 +36,8 @@ export function ProfileMe(props: { inboxId: InboxId }) {
3536

3637
const { logout } = useLogout();
3738

39+
const insets = useSafeAreaInsets();
40+
3841
// Get the edit mode state from the store
3942
const editMode = useProfileMeStoreValue(inboxId, (state) => state.editMode);
4043

@@ -50,7 +53,12 @@ export function ProfileMe(props: { inboxId: InboxId }) {
5053
useProfileMeScreenHeader({ inboxId });
5154

5255
return (
53-
<Screen preset="fixed" backgroundColor={theme.colors.background.surface}>
56+
<Screen
57+
preset="scroll"
58+
backgroundColor={theme.colors.background.surface}
59+
keyboardOffset={insets.bottom}
60+
keyboardShouldPersistTaps="handled"
61+
>
5462
<ProfileSection>
5563
{/* Show editable avatar and name when in edit mode */}
5664
{editMode ? (

0 commit comments

Comments
 (0)