From 92c7e1a0c15b7c4eec93443345fd3e9abaabf37e Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Fri, 27 Jun 2025 13:54:50 +0500 Subject: [PATCH] mobile: wrap add-reminder screen in keyboard avoiding view on ios --- .../mobile/app/screens/add-reminder/index.tsx | 692 +++++++++--------- 1 file changed, 357 insertions(+), 335 deletions(-) diff --git a/apps/mobile/app/screens/add-reminder/index.tsx b/apps/mobile/app/screens/add-reminder/index.tsx index 9b7c8a809..7e5453a7b 100644 --- a/apps/mobile/app/screens/add-reminder/index.tsx +++ b/apps/mobile/app/screens/add-reminder/index.tsx @@ -21,7 +21,13 @@ import { strings } from "@notesnook/intl"; import { useThemeColors } from "@notesnook/theme"; import dayjs from "dayjs"; import React, { useRef, useState } from "react"; -import { Platform, ScrollView, TextInput, View } from "react-native"; +import { + KeyboardAvoidingView, + Platform, + ScrollView, + TextInput, + View +} from "react-native"; import DatePicker from "react-native-date-picker"; import DateTimePickerModal from "react-native-modal-datetime-picker"; import { SafeAreaView } from "react-native-safe-area-context"; @@ -199,6 +205,8 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) { } } + const KeyboardViewIOS = Platform.OS === "ios" ? KeyboardAvoidingView : View; + return ( ) { flex: 1 }} > -
- - - (title.current = text)} - wrapperStyle={{ - marginTop: DefaultAppStyles.GAP_VERTICAL +
- - (details.current = text)} - containerStyle={{ - maxHeight: 80 - }} - multiline - textAlignVertical="top" - inputStyle={{ - minHeight: 80, - paddingVertical: DefaultAppStyles.GAP_VERTICAL - }} - height={80} - wrapperStyle={{ - marginBottom: DefaultAppStyles.GAP_VERTICAL - }} - /> - + - {Object.keys(ReminderModes).map((mode) => ( -