Adjust key repeat timer duration based on page animation setting.

This commit is contained in:
2025-04-21 19:16:43 +08:00
parent aa9f4dae82
commit 0d3fde9457

View File

@@ -443,7 +443,9 @@ class _GalleryModeState extends State<_GalleryMode>
}
if (event is KeyRepeatEvent && keyRepeatTimer == null) {
keyRepeatTimer = Timer.periodic(
const Duration(milliseconds: 200),
reader.enablePageAnimation
? const Duration(milliseconds: 200)
: const Duration(milliseconds: 50),
(timer) {
if (!mounted) {
timer.cancel();