Commit Graph
34 Commits
Author SHA1 Message Date
schroda 649a17c2ae Move "ReaderTransitionPage" to "ReaderViewer" 2025-01-21 19:19:27 +01:00
schroda 19f83d5237 Extract hooks from utils file 2025-01-18 22:07:59 +01:00
schroda 757cf599d6 Enable mouse drag scrolling for all reading modes 2025-01-10 02:07:24 +01:00
schroda afc3a23ae0 Always scroll to start of page on page change
By the time the scroll area got scrolled to the start of the visible pages, the previous/next page wasn't yet shown and thus, the scrollable area wasn't updated yet.
Thus, in case the scrollable area grew in width due to the page change, the start never got scrolled into view due to triggering the logic too early.
2025-01-10 02:03:31 +01:00
schroda a423d11442 Prevent reader pages from getting cut off on small screens
In case the pages were larger in width then the screen, they got cut off and were not fully viewable.
2025-01-09 21:41:38 +01:00
schroda 17cf8ec9d0 Update "pagesToSpreadState" during render
Gets rid of an unnecessary rendering
2024-12-31 13:25:37 +01:00
schroda 3bab657c52 Update "actualPages" immediately
Instead of immediately updating the value once the page count changed, it got updated after "pagesToSpreadState" changed, which was after the rendering finished.

This was the actual root cause of what was tried to be fixed with 9ab6ec89c7
2024-12-31 13:24:29 +01:00
schroda 95f95e770f Prevent TypeError and incorrect state updates for "pagesSpreadState"
Page spread state updates of an already closed chapter caused TypeErrors or incorrect state updates.
2024-12-30 21:03:13 +01:00
schroda 7c98bab43b Prevent TypeError and incorrect state updates for "pageLoadStates"
Page load state updates of an already closed chapter caused TypeErrors or incorrect state updates.
2024-12-30 21:03:10 +01:00
schroda 45f46a05d0 Optionally show preview or "reading mode" and "tap zone overlay"
Shows a preview when opening the reader or when the values change
2024-12-30 16:51:39 +01:00
schroda a943d2f2bc Extract logic from "ReaderViewer" into functions and hooks 2024-12-29 21:38:31 +01:00
schroda 94ee7d4958 Improve "page spread page state" updates
Since "pagesToSpreadState" isn't part of the dependency array and also would decrease the render performance if it was (see reasoning of c79f7cc874), the array reference might be out of date and thus, the guard might not work correctly
2024-12-29 21:38:24 +01:00
schroda c79f7cc874 Improve "page load state" updates
Changes of d6ff85fdd3 decreased the render performance due to the "onLoad" function changing and causing all pages to re-render.
2024-12-29 17:21:37 +01:00
schroda 347c88f240 Correctly check "page load state" before state update 2024-12-28 01:59:07 +01:00
schroda c5630ca5ce Reset "pageToScrollToIndex" after page selection
In case the current page changed after selecting a page, the previously selected page couldn't be selected again since the "pageToScrollToIndex" was still set to this page
2024-12-28 01:28:12 +01:00
schroda d6ff85fdd3 Prevent unnecessary "page load state" updates
Only update state in case it has changed
2024-12-27 18:26:19 +01:00
schroda e2075a651e Add "automatic scrolling" 2024-12-27 03:02:39 +01:00
schroda 5220f8ca44 Prevent unnecessary "page spread state" updates
Only update state in case it has changed
2024-12-25 23:50:07 +01:00
schroda ae89a42ac4 Scroll to start of page on page change
Resets the scroll position for single/double page mode to the start of the opened page on a page change.
2024-12-25 02:59:53 +01:00
schroda 34ad331a71 Improve memoization of page rendering 2024-12-22 00:48:22 +01:00
schroda 58c402dd0e Memoize components 2024-12-22 00:48:21 +01:00
schroda f5642af219 Use HOC for reader context usage 2024-12-22 00:48:18 +01:00
schroda 392998f4ca Prevent going to next page on "offset spread pages" change
Due to handling an "offset spread page" change as if the "double page" mode got activated, the index of the secondary page was set, which resulted in opening the next page
2024-12-17 01:55:11 +01:00
schroda f51446995a Fix "continuous vertical pager" unintentional page gaps
Depending on the screen size and e.g. the set "reader width" pages might not have filled out the full img elements size due to "object-fit contain".
This was caused due to the image wrappers flex container "align-items center" which slightly reduced the images width to some ".xy" number (e.g. instead of wrappers width 258px, the images were something like 257.83px)
2024-12-16 22:09:00 +01:00
schroda 942d8699c1 Add "Webtoon" reading mode 2024-12-16 22:08:58 +01:00
schroda d00c930598 Fix "is read" detection in single/double page mode
In case the last page of a manga was immediately visible or the became visible after the "image spread state" change, the chapter never got marked as read
2024-12-12 13:21:48 +01:00
schroda 8ca0af8d02 Hide overlay on page/scroll change 2024-12-11 22:36:02 +01:00
schroda 1387a016c7 Fix page changes via click/hotkey in horizontal pager
Due to the way the pages got scrolled into view, the current page was not changed to the new page.
This then prevented the previous/next page to get opened via click/hotkey actions
2024-12-09 15:07:52 +01:00
schroda be0d1dbf30 Add logic to retry all errored pages 2024-12-09 02:38:37 +01:00
schroda 5de5eb7cdc Hide cursor on mouse inactivity 2024-12-09 02:38:37 +01:00
schroda 965aa7215c Update chapter 2024-12-09 02:38:37 +01:00
schroda 206c216093 Add mouse drag scrolling to continuous pagers 2024-12-09 02:38:37 +01:00
schroda fb31a92cd7 Reader transition page 2024-12-09 02:38:37 +01:00
schroda 7cf78e771a Reader page rendering 2024-12-09 02:38:37 +01:00