Commit Graph

59 Commits

Author SHA1 Message Date
schroda
61471ae214 Show missing chapter info in chapter list
Closes #836
2025-05-24 22:03:54 +02:00
schroda
86f1905c7c Cleanup ReaderControls#scroll 2025-05-10 01:58:54 +02:00
schroda
40abcd828f Keep previous/next transition page open on first/last chapter previous/next page tap-zone click
In case the transition pages are disabled and the first/last chapters previous/next transition page was visible, clicking the next/previous tap-zone caused the chapter to jump to the first page of the current chapter.

Regression f0f740f4af
2025-05-10 01:58:51 +02:00
schroda
afdaf1f429 Move chapter types and constants to corresponding files 2025-05-05 01:54:44 +02:00
schroda
f0f740f4af Add option to disable transition pages
The previous/next transition page of the first/last chapter will still be shown to indicate that there is no previous/next chapter
2025-05-05 01:26:27 +02:00
schroda
beda5096d1 Add option to disable "infinite chapter scroll" 2025-04-26 23:19:01 +02:00
schroda
0f49115b23 Keep rendered chapters on infinite scroll chapter change
The changes from 642708b8b3 didn't consider the case were the chapter change was triggered due to scrolling to the unloaded previous/next chapter with infinite scroll
2025-04-02 02:45:22 +02:00
schroda
642708b8b3 Immediately open previous/next chapter on reader nav bar button click
The logic didn't handle cases were the next/previous chapter wasn't loaded yet, which lead to the load happening in the background without any user feedback.
2025-04-02 02:27:01 +02:00
schroda
72fb053971 Add "scroll amount" setting 2025-03-27 19:49:49 +01:00
schroda
6ebf13d328 Properly log errors 2025-03-03 23:59:58 +01:00
schroda
ba3f0f6574 Fix closing transition pages in first/last chapter
In case the first/last chapter of a manga was opened, clicking the previous/next tap-zone caused the last/first page to get opened
2025-02-23 13:06:12 +01:00
schroda
e28c603112 Streamline tap zone click handling 2025-02-18 02:06:12 +01:00
schroda
d3c6acbbfb Fix going to previous/next page from first/last 2025-02-18 02:01:16 +01:00
schroda
10ad7ce5d7 Fix marking chapter as read for single page chapters in paged pagers
Regression from 174d850093
2025-02-17 01:12:56 +01:00
schroda
cc7eca08d7 Handle closing transition pages in paged pagers for single page chapters
In case a chapter only has a single page and the previous/next transition page was visible, it was not possible to go back to the chapters page, since it just opened the previous/next chapter instead
2025-02-17 01:12:55 +01:00
schroda
174d850093 Preload previous/next chapter in reader 2025-02-10 22:40:49 +01:00
schroda
4a9d2903b8 Add infinite scroll to reader 2025-02-03 17:17:35 +01:00
schroda
4789a74785 Add option to open specific chapter via "useOpenChapter" 2025-02-03 17:17:35 +01:00
schroda
91e8b70d35 Rename "initialChapter" to "chapterForDuplicatesHandling" 2025-02-03 17:17:35 +01:00
schroda
c227570b93 Fix closing desktop nav bar after change to none static 2025-01-17 01:26:08 +01:00
schroda
a96bc2c1da Delete chapter when read even if already marked as read
ReaderControls#useUpdateCurrentPageIndex:
On a page change the chapter update needs to be always queued since the deletion of downloaded chapters while reading logic is in the "ReaderService#updateChapter" function.
Thus, when the update is prevented here, this logic would never get triggered.

ReaderService#useUpdateChapter:
In case the read status or lastPageRead of a chapter did not change, the update was not triggered.
However, there might still be chapter downloads that need to be de deleted, which was never handled in such a case.
2025-01-16 13:22:13 +01:00
schroda
64e06b2966 Handle ".5" chapters as full chapter numbers for missing chapter detection
Chapter numbers can change from e.g. "1" to "2.1" and in that case missing chapters were detected.
However, with these weird chapter numbers it's not clear if a chapter is actually missing or not, thus, they should not cause a missing chapter warning
2025-01-11 13:58:46 +01:00
schroda
f90e4597f8 Make mobile progress bar position changeable 2025-01-02 21:48:02 +01:00
schroda
2944252d91 Make chapter transition warnings optional 2025-01-01 17:24:36 +01:00
schroda
f3792edac0 Ignore visible transition pages on page change in continuous pager 2024-12-31 17:03:42 +01:00
schroda
886cc469bc Fix TypeError when reaching scroll end in continuous pager
When the end of the scrollable element is reached in the continuous reader, the last image is not visible anymore.
Thus, the "firstVisibleImageIndex" is invalid and gets incorrectly used for the "isEndReached" case which results in an TypeError when trying to use the actual page via the index
2024-12-31 16:54:21 +01:00
schroda
d6a3d02189 Fix page jumping when scrolling continuous pagers
Both hardcoded thresholds (MIN_VISIBLE_PX 0 or 1) break the "first visible image" detection in different kind of ways.

With 1 it always incorrectly jumps to the next page when resuming a chapter, since the page to resume will bet at 0px.

With 0 it fails to detect the correct first visible image when scrolling (automatically not via wheel or touch) to another page.
This happens when there is no gap between the pages because in this case the start of the current image and the end of the previous image are at the same coordinate.
Thus, the previous image is still incorrectly detected as visible since the end still aligns with the viewports start/end
2024-12-31 16:43:46 +01:00
schroda
a0df80f60a Fix opening previous/next page via user action
Regression 55dc9471d9
2024-12-31 04:24:47 +01:00
schroda
55dc9471d9 Hide chapter transition page in single/double pagers
Transition page got opened and never closed again due to not correctly detecting that a transition page is currently visible
2024-12-30 19:57:18 +01:00
schroda
f3962646e6 Hide "tap zone overlay" on user action 2024-12-30 16:50:54 +01:00
schroda
6bf3e297ef Open previous/next chapter at end of continuous pager via hotkey
For continuous pagers the chapter transition page is always visible regardless of the current "transitionPageMode".
However, this was not properly checked and thus, it wasn't considered to be visible and instead of opening the previous/next chapter, the transition page got set to be visible first and only with the second hotkey press did the chapter get opened
2024-12-30 14:12:11 +01:00
schroda
3185449816 Improve "MobileReaderProgressBar" progress bar click/drag handling
Convert clicks on the progress bar in such a way, that there is a "padding" around the page "dots".
Thus, e.g. even if the click was actually for page 1, if it is inside page 2 padding, it will behave like it was a click for page 2
2024-12-28 04:05:29 +01:00
schroda
6b0df5329b Move "useHandleProgressDragging" to "ReaderControls" 2024-12-27 02:51:38 +01:00
schroda
f5642af219 Use HOC for reader context usage 2024-12-22 00:48:18 +01:00
schroda
570b831604 Extract context types 2024-12-20 21:42:54 +01:00
robo
85bb032d03 fix reader chapter transition warning chapters number (#846) 2024-12-20 13:05:36 +01:00
schroda
0771eabfcf Always open first/last page when closing chapter transition page
When e.g. enabling the "offset spread pages" setting the current page index was still the one of the secondary page, which then caused the first page to get skipped.
2024-12-17 02:07:08 +01:00
schroda
e95cc232a2 Improve reader chapter update on last page reached
In case "endReached" is force set to "true" the chapters last page index should always be set to prevent 2 chapter updates
 - 1. for second to last page, read true
 - 2. last page, read true

This only happens in "continuous pagers" which have to handle cases where the end of the last page is already visible while the last page itself is too small to ever get set as the "current page index"
2024-12-16 14:49:37 +01:00
schroda
33910cc89d Prevent opening previous/next chapter on page selection
In case the first/last page was opened and a specific page was selected, instead of opening the page, the previous/next chapter was opened due to incorrectly handling the page change as a previous/next page change
2024-12-13 02:32:36 +01:00
schroda
f69fbd71d2 Open previous chapter transition page in double page mode
For the double page mode the secondary page index gets used.
This was changed with 9a8655db2f, however, this occurrence was overlooked
2024-12-13 02:30:49 +01:00
schroda
aaf7fb7b30 Prevent hiding overlay on page change through overlay 2024-12-13 02:15:18 +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
89b81de830 Handle ".5" chapters in chapter transition warning
".5" chapters would incorrectly trigger the missing chapter warning
2024-12-12 12:56:40 +01:00
schroda
7307a3350d Catch uncaught promise 2024-12-11 22:40:06 +01:00
schroda
6dd2c8e2ff Show chapter transition warning
- on scanlator change
- on skipped chapters
2024-12-11 22:38:04 +01:00
schroda
8ca0af8d02 Hide overlay on page/scroll change 2024-12-11 22:36:02 +01:00
schroda
8c4ff516c0 Rename "theme.tsx" to "ThemeCreator.ts" 2024-12-11 18:02:03 +01:00
schroda
b3e3d94bda Move "theme.tsx" to proper module 2024-12-11 13:57:24 +01:00
schroda
5cda9a3972 Reduce chapter update mutation requests 2024-12-10 02:12:38 +01:00
schroda
044aa23ad4 Fix lint issue 2024-12-09 16:26:03 +01:00