fix: adjust scroll offset to account for header/footer bars when paginating in scroll mode, closes #1181 (#1193)

This commit is contained in:
Huang Xin
2025-05-19 16:34:05 +08:00
committed by GitHub
parent 554d786105
commit 12d93ba749
3 changed files with 39 additions and 12 deletions
@@ -17,6 +17,7 @@ import { useSidebarStore } from '@/store/sidebarStore';
import { useTranslation } from '@/hooks/useTranslation';
import { useResponsiveSize } from '@/hooks/useResponsiveSize';
import { eventDispatcher } from '@/utils/event';
import { viewPagination } from '../hooks/usePagination';
import { saveViewSettings } from '../utils/viewSettingsHelper';
import { PageInfo } from '@/types/book';
import Button from '@/components/Button';
@@ -77,11 +78,11 @@ const FooterBar: React.FC<FooterBarProps> = ({
};
const handleGoPrev = () => {
view?.goLeft();
viewPagination(view, viewSettings, 'left');
};
const handleGoNext = () => {
view?.goRight();
viewPagination(view, viewSettings, 'right');
};
const handleGoBack = () => {