Load next chapter when getting to the last page (#84)

* Load next chapter when scrolling to the bottom (Webtoon, Continues Vertical)

* Load next chapter when scrolling to the bottom (Paged reader)

* Added missing types to IReaderProps

* Move load next chapter when at last page to VerticalReader

* Dependency fix

* Use react history for loading next page
This commit is contained in:
Forgenn
2021-05-17 09:57:14 +02:00
committed by GitHub
parent e9683a3a37
commit 0b690577da
5 changed files with 46 additions and 6 deletions

View File

@@ -70,7 +70,6 @@ export default function Reader() {
const [manga, setManga] = useState<IMangaCard | IManga>({ id: +mangaId, title: '', thumbnailUrl: '' });
const [chapter, setChapter] = useState<IChapter | IPartialChpter>(initialChapter());
const [curPage, setCurPage] = useState<number>(0);
const { setOverride, setTitle } = useContext(NavbarContext);
useEffect(() => {
// make sure settings has all the keys
@@ -153,6 +152,8 @@ export default function Reader() {
setCurPage={setCurPage}
curPage={curPage}
settings={settings}
manga={manga}
chapter={chapter}
/>
</div>
);