With 8b8da30335 the library now calls `useGetMigratableSources` which uses the same `mangas` query as `GET_LIBRARY_MANGA_COUNT`.
However, they select different fields, which causes the cache to get overwritte, because it apollo-client wasn't merging the results.
* Update useGetVisibleLibraryMangas.ts
Begin implementation of random sort
* Update LibraryOptionsPanel.tsx
Added random sort option
* Update Library.types.ts
Adding random to LibrarySortMode types
* Moved sorting process to before filter
Changed the order of the sorting/filter process. Now sorts through entries before filtering them.
* Implementing Reviewer Feedback: Replacing Random Icon
Replaced icon with Replay icon from mui.
* Update SortRadioInput.tsx
Replaced random icon with replay icon from mui to replicate mihon functionality
* Fixed Formatting
* Update CHANGELOG.md
Added proposed changes from pull request.
* Update CHANGELOG.md
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
---------
Co-authored-by: jburkh10 <jburkh10@terpmail.umd.edu>
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
* feat: add Source filter to library filtering system
Add a new Source filter section to the library options panel that allows
users to filter their library manga by source (e.g. MangaDex, MangaSee).
- Add hasSource to LibraryOptions type and category metadata
- Add source filtering logic in useGetVisibleLibraryMangas
- Add Source section with three-state checkboxes in filter UI
- Show loading spinner while source list loads
- Include source filter in active filter indicator
Closes#1057
* refactor: address review feedback for source filter
- Remove skip option, let query always run
- Use uniqBy from lodash/fp for deduplication
- Remove loading spinner (data available quickly)
- Wrap source section in length check
* docs: add source filter to changelog
---------
Co-authored-by: Copilot <noreply@github.com>
Colors need to be normalized per border so that the multiplier is applied to the sum of the normalized colors.
Normalize the returned color with adjusted thresholds compared to the normalization for the color extraction.
During the extraction the normalization shouldn't be too aggressive to prevent messing up the detection for the color with the highest proportion. Once we have detected the color, we want to be more aggressive about normalizing white and black colors to ensure the background color matches true white and black instead of being slightly off
In case the double page reading mode was used and the current page was a double page, the transition got messed up due to the page text wrapping and growing in height
GET_CATEGORIES_LIBRARY, GET_CATEGORIES_SETTINGS share the same query key in the cache. However, both select different fields.
When cleaning up the database in the library settings, the SETTINGS query is active and refetches due to the cache eviction.
This then wrote the query back into the cache pointing to the existing CategoryType fragments in the cache.
The problem was that the SETTINGS query selects fewer fields than the LIBRARY query.
Due to the query now existing again in the cache, the LIBRARY query was not refetched.
Instead, it used the cached category fragments, which still included the outdated LIBRARY fields from before the eviction
In case clearing the download queue caused the subscription to omit items, the received items did not get removed from the cache.
This resulted in the DownloadStateIndicator to show outdated download info.
The potential partial response wasn't handled properly which resulted in apollo not updating the cache for the successful part.
E.g., chapter reload failed, and manga refresh succeeded. The manga data of the response should have updated the manga in the cache.
The native language code returned by the browser could be a code that is not included in the defined ISOLanguages object. E.g. "en-GB" while the object only has "en".
This caused the "English" browse language to not be able to get selected as an allowed language.
* show only the last chapter red
* fix : case when a load has not enough different manga
* fix : problems with the load of chapters
* Fix "filteredOutAllItemsOfFetchedPage" determination
* Remove logic to load until scrollbar appears
`Virtuoso` (list) doesn't have the same issue as `GridVirtuoso`, i.e. `endReached` gets called on initial render in case there weren't enough items
* Increase history page size (50 -> 150)
Due to the new filtering, it can take forever to load the initial pages/next pages
* Use lodash "uniqBy" for filtering
* Update changelog
---------
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>