unified library options (#168)

* Unified the way options are being handled. now everything uses the LibraryOptionsContext, removed the no-longer used useLibraryOptions hook

* removed query from library options. since it doesn't make sense for this to be cached

* fixed a bug in the useLocalStorage implementation
This commit is contained in:
amr
2022-04-07 12:53:14 +02:00
committed by GitHub
parent ee9c3d8c69
commit 13e6456190
7 changed files with 92 additions and 90 deletions

9
src/typings.d.ts vendored
View File

@@ -262,9 +262,16 @@ type ChapterOptionsReducerAction =
| { type: 'sortReverse' }
| { type: 'showChapterNumber' };
interface LibraryDisplayOptions {
interface LibraryOptions {
// display options
showDownloadBadge: boolean
showUnreadBadge: boolean
gridLayout: number
SourcegridLayout:number
// filter options
downloaded: NullAndUndefined<boolean>
unread: NullAndUndefined<boolean>
sorts: NullAndUndefined<string>
sortDesc: NullAndUndefined<boolean>
}