Drag-to-reorder lists: manual sort_order is canonical, fractional re-slotting, haptic pickup/drop
All checks were successful
Build & Release APK / build (push) Successful in 2m8s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-07 20:47:28 -07:00
parent e7c092f35d
commit 8091c7d94d
5 changed files with 65 additions and 7 deletions

View File

@@ -11,11 +11,14 @@ export default function TaskRow({
task,
uncheckTo = "next",
showStatus,
onLongPress,
}: {
task: Task;
/** Status to revert to when un-checking a done task. */
uncheckTo?: TaskStatus;
showStatus?: boolean;
/** Drag handle for reorderable lists. */
onLongPress?: () => void;
}) {
const router = useRouter();
const meta = [
@@ -37,7 +40,7 @@ export default function TaskRow({
return (
<Animated.View entering={FadeIn.duration(150)}>
<Pressable style={s.row} onPress={() => router.push(`/task/${task.id}`)}>
<Pressable style={s.row} onPress={() => router.push(`/task/${task.id}`)} onLongPress={onLongPress} delayLongPress={200}>
<Pressable
style={[s.checkbox, { borderColor: PRIORITY_COLOR[task.priority] }]}
hitSlop={10}