๐ Fix someday bug
Changes
2 files changed, +23 -15
MODIFY
app/(tabs)/index.tsx
+11 -5
@@ -24,11 +24,17 @@
24
24
25
25
const loadTasks = async () => {
26
26
try {
27
- const inboxTasks = await taskService.getInboxTasks();
28
- const filtered = statusFilter === 'all'
29
- ? inboxTasks
30
- : inboxTasks.filter(t => t.status === statusFilter);
31
- setTasks(filtered);
27
+ if (statusFilter === 'someday') {
28
+ const allTasks = await taskService.getAllTasks();
29
+ const somedayTasks = allTasks.filter(t => !t.completed && t.status === 'someday');
30
+ setTasks(somedayTasks);
31
+ } else {
32
+ const inboxTasks = await taskService.getInboxTasks();
33
+ const filtered = statusFilter === 'all'
34
+ ? inboxTasks
35
+ : inboxTasks.filter(t => t.status === statusFilter);
36
+ setTasks(filtered);
37
+ }
32
38
} catch (error) {
33
39
Alert.alert('Error', 'Failed to load tasks');
34
40
} finally {
MODIFY
app/(tabs)/projects.tsx
+12 -10
@@ -50,7 +50,7 @@
50
50
onPress={() => handleProjectPress(item)}
51
51
activeOpacity={0.7}
52
52
>
53
- <ThemedView style={styles.projectContent}>
53
+ <View style={styles.projectContent}>
54
54
{item.color && (
55
55
<View style={[styles.colorIndicator, { backgroundColor: item.color }]} />
56
56
)}
@@ -67,27 +67,27 @@
67
67
{taskCounts[item.id] || 0} tasks
68
68
</ThemedText>
69
69
</View>
70
- </ThemedView>
70
+ </View>
71
71
</TouchableOpacity>
72
72
);
73
73
74
74
return (
75
75
<ThemedView style={styles.container}>
76
76
<SafeAreaView style={styles.safeArea} edges={['top']}>
77
- <ThemedView style={styles.header}>
77
+ <View style={styles.header}>
78
78
<ThemedText type="title">Projects</ThemedText>
79
79
<ThemedText style={styles.count}>{projects.length} projects</ThemedText>
80
- </ThemedView>
80
+ </View>
81
81
82
82
{projects.length === 0 ? (
83
- <ThemedView style={styles.emptyContainer}>
83
+ <View style={styles.emptyContainer}>
84
84
<ThemedText style={styles.emptyText}>
85
85
๐ No projects yet
86
86
</ThemedText>
87
87
<ThemedText style={styles.emptySubtext}>
88
88
Create a project to organize your tasks
89
89
</ThemedText>
90
- </ThemedView>
90
+ </View>
91
91
) : (
92
92
<FlatList
93
93
data={projects}
@@ -122,12 +122,14 @@
122
122
},
123
123
list: {
124
124
padding: 16,
125
- gap: 12,
125
+ paddingBottom: 100,
126
126
},
127
127
projectCard: {
128
128
borderRadius: 12,
129
- overflow: 'hidden',
129
+ backgroundColor: '#f8fafc',
130
130
marginBottom: 12,
131
+ borderWidth: 1,
132
+ borderColor: '#e2e8f0',
131
133
},
132
134
projectContent: {
133
135
flexDirection: 'row',
@@ -135,8 +137,8 @@
135
137
gap: 12,
136
138
},
137
139
colorIndicator: {
138
- width: 4,
139
- borderRadius: 2,
140
+ width: 6,
141
+ borderRadius: 3,
140
142
},
141
143
projectInfo: {
142
144
flex: 1,