fix: reduce sync timeout duration in PhotoswipeReader for quicker read progress updates

This commit is contained in:
Julien Froidefond
2025-10-19 09:26:42 +02:00
parent e923343f08
commit 626d73ad2f

View File

@@ -100,7 +100,7 @@ export function PhotoswipeReader({ book, pages, onClose, nextBook }: BookReaderP
if (syncTimeoutRef.current) {
clearTimeout(syncTimeoutRef.current);
}
syncTimeoutRef.current = setTimeout(() => syncReadProgress(page), 2000);
syncTimeoutRef.current = setTimeout(() => syncReadProgress(page), 500);
},
[syncReadProgress]
);