Improve changing chapter gesture with continuous mode.

This commit is contained in:
2025-02-22 11:33:58 +08:00
parent 5645d805f5
commit 1464b7d5e5

View File

@@ -349,7 +349,7 @@ const Set<PointerDeviceKind> _kTouchLikeDeviceTypes = <PointerDeviceKind>{
PointerDeviceKind.unknown PointerDeviceKind.unknown
}; };
const double _kChangeChapterOffset = 200; const double _kChangeChapterOffset = 160;
class _ContinuousMode extends StatefulWidget { class _ContinuousMode extends StatefulWidget {
const _ContinuousMode({super.key}); const _ContinuousMode({super.key});
@@ -567,8 +567,10 @@ class _ContinuousModeState extends State<_ContinuousMode>
} }
if (fingers == 0) { if (fingers == 0) {
if (jumpToPrevChapter) { if (jumpToPrevChapter) {
context.readerScaffold.setFloatingButton(0);
reader.toPrevChapter(); reader.toPrevChapter();
} else if (jumpToNextChapter) { } else if (jumpToNextChapter) {
context.readerScaffold.setFloatingButton(0);
reader.toNextChapter(); reader.toNextChapter();
} }
} }
@@ -697,7 +699,7 @@ class _ContinuousModeState extends State<_ContinuousMode>
controller: scrollController, controller: scrollController,
isPrev: false, isPrev: false,
), ),
SizedBox(height: context.padding.bottom + 16), SizedBox(height: 36),
], ],
); );
} }