In case the manga wasn't loaded immediately, trying to access the trackRecords totalCount caused a TypeError because the initial manga object did not specify it
In case no language had been selected yet and the detected browser language is not supported, the selection was set to undefined instead of showing the default language
To prevent unnecessary re-renders.
The current grid state was stored in the session storage which then triggered an immediate re-render because the just saved snapshot got restored again
The current scroll position was preserved when changing the shown content type (browse, latest, filters) or when changing the filters.
Regression introduced with aab3e25031
* Route to "/" in case path is unknown
* Remove deprecated routes
"sources" and "extensions" were merged into "browse" but the routes were never removed, thus, the paths still matched and opened the components
* Require "Theme" to be passed to "SxProps"
Decreases typescript performance otherwise
* Disallow "top" and "third-level" MUI imports
* Exclude "node_modules" in tsconfig
In case these settings were disabled, the other dependent settings were not editable.
This prevented them from being set up as needed before enabling them
* Update local storage functions
* Update local storage hooks
* Add session storage
* Improve storing virtuoso grid snapshot
* Use "useSyncExternalStore" for browser storage access
* Get rid of location replacements in "AppbarSearch"
Use session storage instead to prevent reloading the page all the time due to changing the location
* Get rid of location replacements in "SourceMangas"
Use session storage instead to prevent reloading the page all the time due to changing the location
Basically, instead of updating the width of the image after clicking
`ok`, the width is adjusted live, which makes it easier to figure out
the right value for the manga being viewed.
While implementing this, I realized we can't update the backend every
time we re-render when `liveUpdate` is true, so I've updated the logic
for persisting settings to support skipping the API call to save the
settings in the backend, and only perform the API it when the user
clicks ok on the number setting.
Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
* Optionally prevent deletion and mutation of "MutableListSetting" items
* Save server metadata per device
This makes it possible to e.g. have different settings on a desktop and a smartphone.