Skip to content

Commit dc1c2fc

Browse files
committed
fix(mobile): make queued message removal tappable
1 parent 88744f3 commit dc1c2fc

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎apps/mobile/src/features/threads/ThreadQueueControl.tsx‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { beginQueuedRunEdit, useQueuedRunEdit } from "../../state/queued-run-edi
2626
import { environmentThreadDetails, threadEnvironment } from "../../state/threads";
2727
import { useAtomCommand } from "../../state/use-atom-command";
2828
import {
29+
REMOVE_QUEUED_MESSAGE_ACCESSIBILITY_LABEL,
2930
buildCancelQueuedRunCommand,
3031
resolveQueueDragBeforeRunId,
3132
resolveQueueDropBeforeRunId,
@@ -502,13 +503,20 @@ function QueueRowSwipeable(props: {
502503
props.onRemove();
503504
}}
504505
renderRightActions={() => (
505-
<View
506-
className="items-center justify-center bg-danger"
506+
<Pressable
507+
accessibilityRole="button"
508+
accessibilityLabel={REMOVE_QUEUED_MESSAGE_ACCESSIBILITY_LABEL}
509+
disabled={!props.enabled}
510+
onPress={() => {
511+
swipeableRef.current?.close();
512+
props.onRemove();
513+
}}
514+
className="items-center justify-center bg-danger active:opacity-70 disabled:opacity-40"
507515
style={{ width: REMOVE_ACTION_WIDTH }}
508516
>
509517
<SymbolView name="trash" size={16} tintColorClassName="accent-danger-foreground" />
510518
<Text className="pt-1 text-2xs font-t3-medium text-danger-foreground">Remove</Text>
511-
</View>
519+
</Pressable>
512520
)}
513521
>
514522
{props.children}

0 commit comments

Comments
 (0)