Fix double tap timeout
This commit is contained in:
parent
b0d5acd780
commit
637dfef636
1 changed files with 1 additions and 5 deletions
|
|
@ -548,15 +548,11 @@ export function VideoGrid({ participants }) {
|
||||||
(tileKey) => {
|
(tileKey) => {
|
||||||
const lastTapped = lastTappedRef.current[tileKey];
|
const lastTapped = lastTappedRef.current[tileKey];
|
||||||
|
|
||||||
if (!lastTapped) {
|
if (!lastTapped || Date.now() - lastTapped > 500) {
|
||||||
lastTappedRef.current[tileKey] = Date.now();
|
lastTappedRef.current[tileKey] = Date.now();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Date.now() - lastTapped > 500) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
lastTappedRef.current[tileKey] = 0;
|
lastTappedRef.current[tileKey] = 0;
|
||||||
|
|
||||||
const tile = tiles.find((tile) => tile.key === tileKey);
|
const tile = tiles.find((tile) => tile.key === tileKey);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue