Skip to content

Commit

Permalink
Add threshold for swiping
Browse files Browse the repository at this point in the history
  • Loading branch information
easafe committed Jun 8, 2024
1 parent b43c90f commit b8cb939
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Client/Im/Chat.purs
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,9 @@ quoteMessage contents event model@{ chatting } =
else
pure Nothing
]
Left { startX, endX } → model :> [ if startX < endX then liftEffect quoteIt else pure Nothing ]
Left { startX, endX, startY, endY } → model :> [ if startX < endX && endX - startX >= threshold && startY - endY < threshold then liftEffect quoteIt else pure Nothing ]
where
threshold = 40
quoteIt = do
input ← chatInput chatting
let markup = sanitized <> "\n\n"
Expand Down

0 comments on commit b8cb939

Please sign in to comment.