-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Download file on mobile viewer on press
We want to download file on mobile viewer on press (so when we put the finger on the screen) and not on tap (so when we put the finger on the screen and we release it). I added a throttle to avoid download multiple time the same file because we can no use anymore 'tapCount' with press which was used to avoid download 3 times the file if we tapped 3 times. I also moved to useMemo instead of useCallback to support throttle (see facebook/react#19240).
- Loading branch information
Showing
1 changed file
with
24 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters