Skip to content

Commit

Permalink
long press remove task
Browse files Browse the repository at this point in the history
  • Loading branch information
youniaogu committed Apr 14, 2024
1 parent 4739076 commit 3f95594
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/views/Detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -523,19 +523,13 @@ export const PrehandleDrawer = () => {
<SpinLoading size="sm" height={1} color={`purple.${Math.floor(progress * -5) + 9}00`} />
</Box>
)}
{item.status === AsyncStatus.Fulfilled && (
<Pressable px={1} _pressed={{ opacity: 0.5 }} onPress={() => handleRemove(item.taskId)}>
<Icon
as={MaterialIcons}
size="md"
fontWeight="semibold"
name="check"
color="purple.900"
/>
</Pressable>
)}
{item.status === AsyncStatus.Rejected && (
<Pressable px={1} _pressed={{ opacity: 0.5 }} onPress={() => handleRetry(item.taskId)}>
<Pressable
px={1}
_pressed={{ opacity: 0.5 }}
onPress={() => handleRetry(item.taskId)}
onLongPress={() => handleRemove(item.taskId)}
>
<Text fontWeight="bold" fontSize="sm" color="red.800">
{item.fail.length}
</Text>
Expand Down

0 comments on commit 3f95594

Please sign in to comment.