A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: fix screen jerks when opening add reminder screen from note
Ammar Ahmed07db14f6bf98
diff --git a/apps/mobile/app/hooks/use-actions.tsx b/apps/mobile/app/hooks/use-actions.tsxindex 74fc1daf9..8d169d13f 100644--- a/apps/mobile/app/hooks/use-actions.tsx+++ b/apps/mobile/app/hooks/use-actions.tsx@@ -1128,8 +1128,9 @@ export const useActions = ({id: "add-reminder",title: strings.remindMe(),icon: "clock-plus-outline",- onPress: () => {+ onPress: async () => {close();+ await sleep(100);AddReminder.present(undefined, item);}},diff --git a/apps/mobile/app/screens/add-reminder/index.tsx b/apps/mobile/app/screens/add-reminder/index.tsxindex 989c1d781..4ab3c81f5 100644--- a/apps/mobile/app/screens/add-reminder/index.tsx+++ b/apps/mobile/app/screens/add-reminder/index.tsx@@ -95,7 +95,17 @@ const ReminderNotificationModes = {export default function AddReminder(props: NavigationProps<"AddReminder">) {const { reminder, reference } = props.route.params;- useNavigationFocus(props.navigation, { focusOnInit: true });+ useNavigationFocus(props.navigation, {+ focusOnInit: true,+ onFocus: () => {+ if (!props.route.params?.reminder) {+ setTimeout(() => {+ titleRef.current?.focus();+ }, 200);+ }+ return false;+ }+ });const { colors, isDark } = useThemeColors();const weekFormat = useSettingStore((state) => state.weekFormat);const [reminderMode, setReminderMode] = useState<Reminder["mode"]>(@@ -282,7 +292,6 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) {defaultValue={reminder?.title || referencedItem?.title}placeholder={strings.remindeMeOf()}onChangeText={(text) => (title.current = text)}- autoFocuswrapperStyle={{marginTop: DefaultAppStyles.GAP_VERTICAL}}