Open History to see the last commit
1import { type StaticScreenProps, useNavigation } from "@react-navigation/native";
2import { useAtomValue } from "@effect/atom-react";
3import type { ChatAttachment, EnvironmentId, RunId, ThreadId } from "@t3tools/contracts";
4import { Atom } from "effect/reactivity";
5import { Image } from "expo-image";
6import * as Haptics from "expo-haptics";
7import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
8import { Animated, Platform, Pressable, ScrollView, View } from "react-native";
9import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
10import ReanimatedSwipeable, {
11 type SwipeableMethods,
12} from "react-native-gesture-handler/ReanimatedSwipeable";
13import { Screen, ScreenStack, ScreenStackHeaderConfig } from "react-native-screens";
14import { useSafeAreaInsets } from "react-native-safe-area-context";
15import Reanimated, { ReduceMotion, useAnimatedStyle, withTiming } from "react-native-reanimated";
16
17import { MaterialButton } from "../../components/MaterialButton";
18import { AndroidSheetHeader } from "../../components/AndroidScreenHeader";
19import { AppText as Text } from "../../components/AppText";
20import { SymbolView } from "../../components/AppSymbol";
21import { ControlPillMenu } from "../../components/ControlPill";
22import { MaterialScreenContent } from "../../components/MaterialScreenContent";
23import { scopedThreadKey } from "../../lib/scopedEntities";
24import { useUniwindTheme } from "../../lib/useUniwindTheme";
25import { NativeStackScreenOptions, nativeHeaderScrollEdgeEffects } from "../../native/StackHeader";
26import { useAssetUrl } from "../../state/assets";
27import { assetImageSource } from "../../lib/assetImageSource";
28import { beginQueuedRunEdit, useQueuedRunEdit } from "../../state/queued-run-edit";
29import { environmentThreadDetails, threadEnvironment } from "../../state/threads";
30import { useAtomCommand } from "../../state/use-atom-command";
31import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";
32import {
33 REMOVE_QUEUED_MESSAGE_ACCESSIBILITY_LABEL,
34 buildCancelQueuedRunCommand,
35 resolveQueueDragBeforeRunId,
36 resolveQueueDropBeforeRunId,
37 resolveThreadQueueRowControls,
38} from "./threadQueueControlPresentation";
39import { threadDragGapOffset } from "./threadDragGap";
40
41const HEADER_SCROLL_EDGE_EFFECTS = nativeHeaderScrollEdgeEffects(Platform.OS, Platform.Version);
42const REMOVE_ACTION_WIDTH = 76;
43const THUMBNAIL_LIMIT = 3;
44const EMPTY_QUEUED_COUNT_ATOM = Atom.make(0).pipe(
45 Atom.withLabel("mobile-thread-queue-count:empty"),
46);
47
48type QueueTarget = { readonly environmentId: EnvironmentId; readonly threadId: ThreadId };
49type QueueAction = "steer" | "edit" | "up" | "down" | "remove";
50type QueueRowLayout = { readonly id: RunId; readonly y?: number; readonly height?: number };
51
52export function useThreadQueueWorkflow(target: QueueTarget) {
53 return useAtomValue(environmentThreadDetails.queueWorkflowAtom(target));
54}
55
56export function useThreadQueuedCount(target: QueueTarget | null) {
57 return useAtomValue(
58 target === null ? EMPTY_QUEUED_COUNT_ATOM : environmentThreadDetails.queuedCountAtom(target),
59 );
60}
61
62export function ThreadQueueSheet({ route }: StaticScreenProps<QueueTarget>) {
63 const { layout } = useAdaptiveWorkspaceLayout();
64 const target = route.params;
65 const navigation = useNavigation();
66 const insets = useSafeAreaInsets();
67 const theme = useUniwindTheme();
68 const workflow = useThreadQueueWorkflow(target);
69 const threadKey = scopedThreadKey(target.environmentId, target.threadId);
70 const editing = useQueuedRunEdit(threadKey);
71 const reorder = useAtomCommand(threadEnvironment.reorderQueuedRun, "reorder queued message");
72 const promote = useAtomCommand(threadEnvironment.promoteQueuedRun, "promote queued message");
73 const cancel = useAtomCommand(threadEnvironment.cancelQueuedRun, "remove queued message");
74 const resume = useAtomCommand(threadEnvironment.resumeThreadQueue, "resume queue");
75 const [resuming, setResuming] = useState(false);
76 const [busyRunId, setBusyRunId] = useState<RunId | null>(null);
77 const busyRef = useRef(false);
78 const [draggedRunId, setDraggedRunId] = useState<RunId | null>(null);
79 const [previewBeforeRunId, setPreviewBeforeRunId] = useState<RunId | null | undefined>();
80 const [dragRows, setDragRows] = useState<ReadonlyArray<QueueRowLayout> | null>(null);
81 const rowLayouts = useRef(new Map<RunId, { y: number; height: number }>());
82 const drag = useRef<{
83 runId: RunId;
84 order: string;
85 beforeRunId: RunId | null | undefined;
86 rows: ReadonlyArray<QueueRowLayout>;
87 } | null>(null);
88 const [translation] = useState(() => new Animated.Value(0));
89 const queuedRuns = workflow?.queuedRuns ?? [];
90 const order = queuedRuns.map(({ run }) => run.id).join(",");
91
92 useEffect(() => {
93 if (drag.current && drag.current.order !== order) {
94 drag.current = null;
95 setDraggedRunId(null);
96 setPreviewBeforeRunId(undefined);
97 setDragRows(null);
98 translation.setValue(0);
99 }
100 }, [order, translation]);
101
102 // Nothing left to manage: the sheet closes rather than sitting on an empty
103 // list the user has to dismiss themselves.
104 const hadQueuedRuns = useRef(queuedRuns.length > 0);
105 useEffect(() => {
106 if (queuedRuns.length > 0) {
107 hadQueuedRuns.current = true;
108 return;
109 }
110 if (hadQueuedRuns.current) navigation.goBack();
111 }, [navigation, queuedRuns.length]);
112
113 const move = async (runId: RunId, beforeRunId: RunId | null) => {
114 if (busyRef.current || !workflow?.canReorder) return;
115 busyRef.current = true;
116 setBusyRunId(runId);
117 void Haptics.selectionAsync();
118 try {
119 await reorder({ ...target, input: { threadId: target.threadId, runId, beforeRunId } });
120 } finally {
121 busyRef.current = false;
122 setBusyRunId(null);
123 }
124 };
125
126 const act = async (runId: RunId, action: QueueAction) => {
127 if (busyRef.current) return;
128 const index = queuedRuns.findIndex(({ run }) => run.id === runId);
129 if (index < 0) return;
130 if (action === "up" && index > 0) {
131 await move(runId, queuedRuns[index - 1]!.run.id);
132 return;
133 }
134 if (action === "down" && index < queuedRuns.length - 1) {
135 await move(runId, queuedRuns[index + 2]?.run.id ?? null);
136 return;
137 }
138 if (action === "edit") {
139 const entry = queuedRuns[index]!;
140 void Haptics.selectionAsync();
141 beginQueuedRunEdit(threadKey, {
142 runId,
143 messageId: entry.messageId,
144 originalText: entry.text,
145 existingAttachments: entry.attachments,
146 ...(entry.context ? { context: entry.context } : {}),
147 });
148 navigation.goBack();
149 return;
150 }
151 if (action !== "steer" && action !== "remove") return;
152 busyRef.current = true;
153 setBusyRunId(runId);
154 void Haptics.selectionAsync();
155 try {
156 if (action === "remove") {
157 await cancel(buildCancelQueuedRunCommand({ ...target, runId }));
158 } else if (workflow?.activeRun && workflow.canPromoteToSteer) {
159 await promote({
160 ...target,
161 input: {
162 threadId: target.threadId,
163 queuedRunId: runId,
164 targetRunId: workflow.activeRun.id,
165 },
166 });
167 }
168 } finally {
169 busyRef.current = false;
170 setBusyRunId(null);
171 }
172 };
173
174 const canReorder = workflow?.canReorder === true && queuedRuns.length > 1;
175 const sourceLayout = dragRows?.find((row) => row.id === draggedRunId);
176 const lastLayout = dragRows?.at(-1);
177 const insertionOffset =
178 previewBeforeRunId === undefined
179 ? undefined
180 : previewBeforeRunId === null
181 ? lastLayout?.y === undefined || lastLayout.height === undefined
182 ? undefined
183 : lastLayout.y + lastLayout.height
184 : dragRows?.find((row) => row.id === previewBeforeRunId)?.y;
185 const queueRows = () =>
186 queuedRuns.map(({ run }) => ({ id: run.id, ...rowLayouts.current.get(run.id) }));
187 const content = (
188 <ScrollView
189 nestedScrollEnabled
190 className="flex-1"
191 scrollEnabled={draggedRunId === null}
192 // The iOS header is translucent and floats over this view; UIKit has to
193 // inset the content or the first row sits underneath the title.
194 contentInsetAdjustmentBehavior={Platform.OS === "ios" ? "automatic" : "never"}
195 contentContainerClassName="px-5 pb-6"
196 contentContainerStyle={{ paddingBottom: Math.max(insets.bottom, 16) + 8 }}
197 >
198 {workflow?.isHeld && queuedRuns.length > 0 ? (
199 <View className="gap-2 py-3">
200 <Text className="text-sm text-foreground-muted">Queue held after restart</Text>
201 <MaterialButton
202 label="Resume queue"
203 disabled={resuming || busyRunId !== null}
204 onPress={async () => {
205 if (busyRef.current) return;
206 busyRef.current = true;
207 setResuming(true);
208 try {
209 await resume({ ...target, input: { threadId: target.threadId } });
210 } finally {
211 busyRef.current = false;
212 setResuming(false);
213 }
214 }}
215 />
216 </View>
217 ) : null}
218 {queuedRuns.length === 0 ? (
219 <Text className="pt-6 text-center text-sm text-foreground-muted">
220 No messages waiting in this queue.
221 </Text>
222 ) : null}
223 {queuedRuns.map(({ run, text, attachments }, index) => {
224 const layout = dragRows?.find((row) => row.id === run.id);
225 const offset =
226 sourceLayout?.y !== undefined &&
227 sourceLayout.height !== undefined &&
228 layout?.y !== undefined &&
229 insertionOffset !== undefined
230 ? threadDragGapOffset(layout.y, sourceLayout.y, sourceLayout.height, insertionOffset)
231 : 0;
232 const controls = resolveThreadQueueRowControls({
233 busy: busyRunId !== null || draggedRunId !== null,
234 canPromoteToSteer: workflow?.canPromoteToSteer ?? false,
235 canReorder: workflow?.canReorder ?? false,
236 index,
237 isEditing: editing?.runId === run.id,
238 queuedCount: queuedRuns.length,
239 text,
240 });
241 const title =
242 controls.displayText || (attachments.length > 0 ? "Attachments" : "Queued message");
243 return (
244 <QueueShiftedRow
245 key={run.id}
246 offset={offset}
247 dragging={draggedRunId !== null}
248 lifted={draggedRunId === run.id}
249 onLayout={({ nativeEvent }) => rowLayouts.current.set(run.id, nativeEvent.layout)}
250 >
251 <Animated.View
252 className="flex-row items-center border-b border-border bg-sheet"
253 style={
254 draggedRunId === run.id
255 ? { transform: [{ translateY: translation }], zIndex: 1, opacity: 0.85 }
256 : undefined
257 }
258 >
259 {canReorder ? (
260 // Outside the swipeable: two pans on one row would race, and
261 // the handle owns vertical movement while the row owns sideways.
262 <QueueDragHandle
263 disabled={busyRunId !== null}
264 title={title}
265 canMoveUp={controls.canMoveUp}
266 canMoveDown={controls.canMoveDown}
267 onStep={(action) => void act(run.id, action)}
268 onStart={() => {
269 const rows = queueRows();
270 const beforeRunId = resolveQueueDragBeforeRunId(rows, run.id, 0);
271 drag.current = { runId: run.id, order, beforeRunId, rows };
272 translation.setValue(0);
273 setDragRows(rows);
274 setPreviewBeforeRunId(beforeRunId);
275 setDraggedRunId(run.id);
276 void Haptics.selectionAsync();
277 }}
278 onMove={(y) => {
279 const current = drag.current;
280 if (current?.runId !== run.id || current.order !== order) return;
281 translation.setValue(y);
282 const before = resolveQueueDragBeforeRunId(current.rows, run.id, y);
283 if (current.beforeRunId !== before) {
284 current.beforeRunId = before;
285 setPreviewBeforeRunId(before);
286 }
287 }}
288 onEnd={(y, success) => {
289 const started = drag.current;
290 const stop = () => {
291 if (drag.current !== started) return;
292 drag.current = null;
293 setDraggedRunId(null);
294 setPreviewBeforeRunId(undefined);
295 setDragRows(null);
296 translation.setValue(0);
297 };
298 // A remote reorder or a newly started run invalidates this drag.
299 if (!success || started?.order !== order || started.runId !== run.id) {
300 stop();
301 return;
302 }
303 const before = resolveQueueDropBeforeRunId(started.rows, run.id, y);
304 if (before === undefined) {
305 stop();
306 return;
307 }
308 const source = started.rows.find((row) => row.id === run.id);
309 const tail = started.rows.at(-1);
310 const insertion =
311 before === null
312 ? tail?.y !== undefined && tail.height !== undefined
313 ? tail.y + tail.height
314 : undefined
315 : started.rows.find((row) => row.id === before)?.y;
316 if (
317 source?.y !== undefined &&
318 source.height !== undefined &&
319 insertion !== undefined
320 ) {
321 Animated.timing(translation, {
322 toValue: insertion - source.y - (insertion > source.y ? source.height : 0),
323 duration: 160,
324 useNativeDriver: true,
325 }).start();
326 }
327 setPreviewBeforeRunId(before);
328 void move(run.id, before).finally(stop);
329 }}
330 />
331 ) : null}
332 <QueueRowSwipeable
333 enabled={draggedRunId === null && busyRunId === null && controls.canDismiss}
334 background={theme["--color-sheet"]}
335 onRemove={() => void act(run.id, "remove")}
336 >
337 <ControlPillMenu
338 accessibilityLabel={`Actions for queued message ${index + 1}`}
339 shouldOpenOnLongPress
340 actions={[
341 ...(workflow?.canPromoteToSteer
342 ? [
343 {
344 id: "steer",
345 title: "Steer now",
346 attributes: { disabled: !controls.canSteer },
347 image: Platform.OS === "ios" ? "arrow.turn.left.up" : "arrow_upward",
348 },
349 ]
350 : []),
351 {
352 id: "edit",
353 title: "Edit",
354 attributes: { disabled: !controls.canEdit },
355 image: Platform.OS === "ios" ? "pencil" : "edit",
356 },
357 { id: "up", title: "Move up", attributes: { disabled: !controls.canMoveUp } },
358 {
359 id: "down",
360 title: "Move down",
361 attributes: { disabled: !controls.canMoveDown },
362 },
363 {
364 id: "remove",
365 title: "Remove",
366 attributes: { disabled: !controls.canDismiss, destructive: true },
367 },
368 ]}
369 onPressAction={({ nativeEvent }) =>
370 void act(run.id, nativeEvent.event as QueueAction)
371 }
372 >
373 <Pressable
374 accessibilityRole="button"
375 accessibilityLabel={title}
376 accessibilityHint="Opens this message in the composer for editing"
377 disabled={!controls.canEdit}
378 onPress={() => void act(run.id, "edit")}
379 className="min-h-14 flex-row items-center gap-2.5 py-2.5 active:opacity-70"
380 >
381 <QueueAttachmentThumbnails
382 environmentId={target.environmentId}
383 attachments={attachments}
384 />
385 <Text
386 className={
387 controls.isEditing
388 ? "min-w-0 flex-1 text-sm text-foreground-muted"
389 : "min-w-0 flex-1 text-sm text-foreground"
390 }
391 numberOfLines={1}
392 >
393 {title}
394 </Text>
395 {controls.isEditing ? (
396 <Text className="shrink-0 text-2xs uppercase tracking-wide text-primary">
397 Editing
398 </Text>
399 ) : null}
400 {workflow?.canPromoteToSteer ? (
401 <Pressable
402 accessibilityRole="button"
403 accessibilityLabel={`Steer with message ${index + 1} now`}
404 disabled={!controls.canSteer}
405 onPress={() => void act(run.id, "steer")}
406 className="h-8 shrink-0 justify-center rounded-full bg-primary px-3 active:opacity-70 disabled:opacity-40"
407 >
408 <Text className="font-t3-medium text-xs text-primary-foreground">
409 Steer
410 </Text>
411 </Pressable>
412 ) : null}
413 </Pressable>
414 </ControlPillMenu>
415 </QueueRowSwipeable>
416 </Animated.View>
417 </QueueShiftedRow>
418 );
419 })}
420 </ScrollView>
421 );
422
423 if (Platform.OS === "ios") {
424 // A plain formSheet screen never renders a stack header, so it comes from
425 // a nested native stack inside the sheet (same shape as the git sheet).
426 return (
427 <GestureHandlerRootView style={{ flex: 1 }}>
428 <View collapsable={false} className="flex-1 bg-sheet">
429 <ScreenStack style={{ flex: 1 }}>
430 <Screen
431 activityState={2}
432 enabled
433 isNativeStack
434 screenId="thread-queue-sheet-native"
435 scrollEdgeEffects={HEADER_SCROLL_EDGE_EFFECTS}
436 style={{ backgroundColor: theme["--color-sheet"], flex: 1 }}
437 >
438 {content}
439 <ScreenStackHeaderConfig
440 backgroundColor="rgba(0,0,0,0)"
441 color={theme["--color-foreground"]}
442 hideBackButton
443 hideShadow={false}
444 title="Queued"
445 titleColor={theme["--color-foreground"]}
446 titleFontSize={18}
447 titleFontWeight="800"
448 translucent
449 />
450 </Screen>
451 </ScreenStack>
452 </View>
453 </GestureHandlerRootView>
454 );
455 }
456
457 return (
458 <GestureHandlerRootView style={{ flex: 1 }}>
459 <View collapsable={false} className="flex-1 bg-sheet">
460 <NativeStackScreenOptions options={{ sheetCornerRadius: 28 }} />
461 <AndroidSheetHeader title="Queued" onBack={() => navigation.goBack()} />
462 <MaterialScreenContent insetHorizontal={layout.usesSplitView}>
463 {content}
464 </MaterialScreenContent>
465 </View>
466 </GestureHandlerRootView>
467 );
468}
469
470function QueueShiftedRow(props: {
471 readonly offset: number;
472 readonly dragging: boolean;
473 readonly lifted: boolean;
474 readonly onLayout: React.ComponentProps<typeof View>["onLayout"];
475 readonly children: React.ReactNode;
476}) {
477 const { dragging, offset } = props;
478 const style = useAnimatedStyle(() => ({
479 transform: [
480 {
481 translateY: dragging
482 ? withTiming(offset, { duration: 160, reduceMotion: ReduceMotion.System })
483 : offset,
484 },
485 ],
486 }));
487 return (
488 <Reanimated.View onLayout={props.onLayout} style={[style, { zIndex: props.lifted ? 1 : 0 }]}>
489 {props.children}
490 </Reanimated.View>
491 );
492}
493
494/** Swipe left to remove, the one destructive action that needs no menu. */
495function QueueRowSwipeable(props: {
496 readonly enabled: boolean;
497 readonly background: string;
498 readonly onRemove: () => void;
499 readonly children: React.ReactNode;
500}) {
501 const swipeableRef = useRef<SwipeableMethods | null>(null);
502 return (
503 <ReanimatedSwipeable
504 ref={swipeableRef}
505 enabled={props.enabled}
506 friction={2}
507 rightThreshold={40}
508 overshootRight={false}
509 // The sheet's own vertical scroll and the drag handle both move up and
510 // down; a swipe has to be clearly sideways before it takes the gesture.
511 failOffsetY={[-12, 12]}
512 containerStyle={{ backgroundColor: props.background, flex: 1 }}
513 childrenContainerStyle={{ backgroundColor: props.background }}
514 onSwipeableOpen={(direction) => {
515 if (direction !== "right") return;
516 swipeableRef.current?.close();
517 props.onRemove();
518 }}
519 renderRightActions={() => (
520 <Pressable
521 accessibilityRole="button"
522 accessibilityLabel={REMOVE_QUEUED_MESSAGE_ACCESSIBILITY_LABEL}
523 disabled={!props.enabled}
524 onPress={() => {
525 swipeableRef.current?.close();
526 props.onRemove();
527 }}
528 className="items-center justify-center bg-danger active:opacity-70 disabled:opacity-40"
529 style={{ width: REMOVE_ACTION_WIDTH }}
530 >
531 <SymbolView name="trash" size={16} tintColorClassName="accent-danger-foreground" />
532 <Text className="pt-1 text-2xs font-t3-medium text-danger-foreground">Remove</Text>
533 </Pressable>
534 )}
535 >
536 {props.children}
537 </ReanimatedSwipeable>
538 );
539}
540
541function QueueAttachmentThumbnails(props: {
542 readonly environmentId: EnvironmentId;
543 readonly attachments: ReadonlyArray<ChatAttachment>;
544}) {
545 const images = props.attachments.filter((attachment) => attachment.mimeType.startsWith("image/"));
546 const shown = images.slice(0, THUMBNAIL_LIMIT);
547 const overflow = props.attachments.length - shown.length;
548 if (props.attachments.length === 0) return null;
549 return (
550 <View className="shrink-0 flex-row items-center gap-1">
551 {shown.map((attachment) => (
552 <QueueAttachmentThumbnail
553 key={attachment.id}
554 environmentId={props.environmentId}
555 attachment={attachment}
556 />
557 ))}
558 {overflow > 0 ? (
559 <View className="h-6 min-w-6 items-center justify-center rounded bg-subtle px-1">
560 <Text className="text-2xs tabular-nums text-foreground-muted">
561 {shown.length === 0 ? `${overflow}` : `+${overflow}`}
562 </Text>
563 </View>
564 ) : null}
565 </View>
566 );
567}
568
569function QueueAttachmentThumbnail(props: {
570 readonly environmentId: EnvironmentId;
571 readonly attachment: ChatAttachment;
572}) {
573 const resource = {
574 _tag: "attachment",
575 attachmentId: props.attachment.id,
576 fileName: props.attachment.name,
577 mimeType: props.attachment.mimeType,
578 disposition: "inline",
579 } as const;
580 const url = useAssetUrl(props.environmentId, resource);
581 if (url === null) {
582 return <View className="h-6 w-6 rounded bg-subtle" />;
583 }
584 return (
585 <Image
586 source={assetImageSource(props.environmentId, resource, url)}
587 cachePolicy="memory-disk"
588 contentFit="cover"
589 style={{ width: 24, height: 24, borderRadius: 4 }}
590 accessibilityIgnoresInvertColors
591 />
592 );
593}
594
595function QueueDragHandle(props: {
596 disabled: boolean;
597 title: string;
598 canMoveUp: boolean;
599 canMoveDown: boolean;
600 onStep: (action: "up" | "down") => void;
601 onStart: () => void;
602 onMove: (y: number) => void;
603 onEnd: (y: number, success: boolean) => void;
604}) {
605 const latest = useRef(props);
606 useLayoutEffect(() => {
607 latest.current = props;
608 });
609 const gesture = useMemo(
610 () =>
611 Gesture.Pan()
612 .enabled(!props.disabled)
613 .minDistance(0)
614 .shouldCancelWhenOutside(false)
615 .runOnJS(true)
616 .onStart(() => latest.current.onStart())
617 .onUpdate((event) => latest.current.onMove(event.translationY))
618 .onFinalize((event, success) => latest.current.onEnd(event.translationY, success)),
619 [props.disabled],
620 );
621 return (
622 <GestureDetector gesture={gesture}>
623 <View
624 collapsable={false}
625 accessible
626 accessibilityRole="adjustable"
627 accessibilityLabel={`Reorder ${props.title}`}
628 accessibilityState={{ disabled: props.disabled }}
629 accessibilityActions={[
630 ...(props.canMoveUp ? [{ name: "decrement", label: "Move up" }] : []),
631 ...(props.canMoveDown ? [{ name: "increment", label: "Move down" }] : []),
632 ]}
633 onAccessibilityAction={({ nativeEvent }) => {
634 if (props.disabled) return;
635 if (nativeEvent.actionName === "decrement" && props.canMoveUp) props.onStep("up");
636 if (nativeEvent.actionName === "increment" && props.canMoveDown) props.onStep("down");
637 }}
638 className="h-12 w-8 items-center justify-center"
639 >
640 <SymbolView
641 name="line.3.horizontal"
642 size={16}
643 tintColorClassName="accent-foreground-muted"
644 />
645 </View>
646 </GestureDetector>
647 );
648}