Commit eafa545
authored
Use novel refactor (lnreader#1838)
* init
* feat: add zustand dependency and persistence key contract
* refactor: extract bootstrap data loading into reusable service
* refactor: move chapter mutations into store-ready action helpers
* feat: add zustand novel store with cache and core actions
* refactor: bridge novel persistence contracts for migration safety
* refactor: migrate NovelScreen domain flows to zustand selectors
* refactor: migrate NovelScreenList to selector-based store access
* refactor: move reader chapter flows onto store boundaries
* refactor: decouple useNovelSettings from broad context domain state
* refactor: align migrateNovel with stable persistence contracts
* refactor: cut novel-reader consumers to store-only context boundary
* refactor: retire legacy useNovel and route cache cleanup export
* test: update suites for store-only context boundary cutover
* test: modernize store-era mocks and add contract coverage
* test: finalize Task-15 sweep—remove dead useNovelData and lint clear mocksContract
Final validation confirms mock-contract test suite clean and target file deletion verified with zero stale references in src/ scope.
* remove imports from NovelScreen
* reworked ai output
* improvements
* implemented synchronus novel and chapter fetch
* refactor tests
* fix db tests
* Update remaining tests.
* Harden chapter actions and bootstrap flows
* Only count filtered chapters
* improved chapter insert speed by optimizing triggers
* Improved the batching function
* Added drizzle support to dbManager.batch
* removed better-sqlite3 for testing
* fix tests
* Update updateNovelChapters fucntion
* reverse read filter
* fix snackbar
* fixed page bottomsheet
* resolved paged novels showing wrong chapter number on opening
* use openPage instead of setPageIndex in chapterDrawer
* fix lint & tests
* fix type issues
* fix various smaller issues
* updated novel restore
* Delete tsconfig.tsbuildinfo1 parent b680a07 commit eafa545
75 files changed
Lines changed: 6232 additions & 2014 deletions
File tree
- __mocks__
- src
- database
- __tests__
- manager
- queries
- __tests__
- queryStrings
- utils
- hooks
- __tests__
- persisted
- __mocks__
- useNovel
- __tests__
- store-helper
- store
- screens
- novel
- __tests__
- components
- Info
- __tests__
- reader
- components
- ChapterDrawer
- __tests__
- hooks
- __tests__
- settings
- SettingsReaderScreen/tabs
- updates
- services
- Trackers
- migrate
- updates
- utils/mmkv
- strings
- languages/en
- types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
148 | | - | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 7 | | |
21 | 8 | | |
22 | 9 | | |
| |||
80 | 67 | | |
81 | 68 | | |
82 | 69 | | |
83 | | - | |
| 70 | + | |
84 | 71 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 72 | + | |
91 | 73 | | |
92 | 74 | | |
93 | 75 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | 76 | | |
149 | 77 | | |
150 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
151 | 81 | | |
152 | | - | |
153 | | - | |
| 82 | + | |
154 | 83 | | |
155 | 84 | | |
156 | 85 | | |
157 | 86 | | |
158 | | - | |
159 | | - | |
160 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
161 | 90 | | |
162 | 91 | | |
163 | 92 | | |
| |||
169 | 98 | | |
170 | 99 | | |
171 | 100 | | |
172 | | - | |
173 | | - | |
174 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
175 | 104 | | |
176 | 105 | | |
177 | 106 | | |
| |||
182 | 111 | | |
183 | 112 | | |
184 | 113 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
188 | 117 | | |
189 | 118 | | |
190 | 119 | | |
| |||
194 | 123 | | |
195 | 124 | | |
196 | 125 | | |
197 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
198 | 129 | | |
199 | 130 | | |
200 | | - | |
| 131 | + | |
201 | 132 | | |
202 | 133 | | |
| 134 | + | |
203 | 135 | | |
204 | 136 | | |
205 | | - | |
| 137 | + | |
206 | 138 | | |
207 | 139 | | |
208 | | - | |
209 | | - | |
210 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
211 | 143 | | |
212 | 144 | | |
213 | 145 | | |
| |||
218 | 150 | | |
219 | 151 | | |
220 | 152 | | |
221 | | - | |
222 | | - | |
223 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
224 | 156 | | |
225 | 157 | | |
226 | 158 | | |
| |||
234 | 166 | | |
235 | 167 | | |
236 | 168 | | |
237 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
238 | 172 | | |
239 | 173 | | |
240 | | - | |
| 174 | + | |
241 | 175 | | |
242 | 176 | | |
243 | | - | |
244 | | - | |
| 177 | + | |
245 | 178 | | |
246 | 179 | | |
247 | | - | |
248 | | - | |
249 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
250 | 183 | | |
251 | 184 | | |
252 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
| |||
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
17 | 34 | | |
18 | 35 | | |
19 | 36 | | |
| |||
0 commit comments