gitshark

Clone repository

git clone https://git.vilip.de/git/vilip/taskflow.git
git clone git@git.vilip.de:vilip/taskflow.git

← Commits

๐Ÿ› Fix page stack bug

e0973e133566511d55d777cd17ddce50517ef1a4 ยท vvilip ยท 2025-11-11T10:45:48Z

Changes

1 file changed, +7 -3

MODIFY app/modal.tsx +7 -3
diff --git a/app/modal.tsx b/app/modal.tsx
index bc954b2..2e40a3e 100644
--- a/app/modal.tsx
+++ b/app/modal.tsx
@@ -1,7 +1,7 @@
1 1 import React, { useRef } from 'react';
2 2 import { StyleSheet, TouchableOpacity, Platform, Dimensions, Keyboard } from 'react-native';
3 3 import { ThemedView } from '@/components/themed-view';
4 -import { router } from 'expo-router';
4 +import { router, useRouter } from 'expo-router';
5 5 import { Gesture, GestureDetector } from 'react-native-gesture-handler';
6 6 import Animated, {
7 7 useSharedValue,
@@ -23,7 +23,11 @@
23 23
24 24 const handleClose = () => {
25 25 taskFormRef.current?.handleSave();
26 - router.dismiss();
26 + if (router.canDismiss()) {
27 + router.dismiss();
28 + } else if (router.canGoBack()) {
29 + router.back();
30 + }
27 31 };
28 32
29 33 const dismissKeyboard = () => {
@@ -64,7 +68,7 @@
64 68 <Animated.View style={[styles.modal, animatedStyle]}>
65 69 <ThemedView style={styles.handle} />
66 70 <ThemedView style={{ flex: 1, backgroundColor: colors.background }}>
67 - <TaskForm ref={taskFormRef} id="new" onSave={() => router.dismiss()} />
71 + <TaskForm ref={taskFormRef} id="new" onSave={handleClose} />
68 72 </ThemedView>
69 73 </Animated.View>
70 74 </GestureDetector>

Keyboard shortcuts

?Show this help
g hGo home
EscClose dialog