Fix double tap timeout

This commit is contained in:
Robert Long 2021-08-31 14:34:18 -07:00
parent b0d5acd780
commit 637dfef636

View file

@ -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);