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) => {
|
||||
const lastTapped = lastTappedRef.current[tileKey];
|
||||
|
||||
if (!lastTapped) {
|
||||
if (!lastTapped || Date.now() - lastTapped > 500) {
|
||||
lastTappedRef.current[tileKey] = Date.now();
|
||||
return;
|
||||
}
|
||||
|
||||
if (Date.now() - lastTapped > 500) {
|
||||
return;
|
||||
}
|
||||
|
||||
lastTappedRef.current[tileKey] = 0;
|
||||
|
||||
const tile = tiles.find((tile) => tile.key === tileKey);
|
||||
|
|
Loading…
Add table
Reference in a new issue