(path)
| 300 | } |
| 301 | |
| 302 | async function read(path) |
| 303 | { |
| 304 | const readingProgress = storage.get('readingProgress'); |
| 305 | const paths = await findReadingProgressPaths(path, true); |
| 306 | |
| 307 | for(let key of paths) |
| 308 | { |
| 309 | key = relative.path(key); |
| 310 | |
| 311 | const progress = readingProgress[key]; |
| 312 | const pages = await countPages(key); |
| 313 | |
| 314 | readingProgress[key] = { |
| 315 | ...progress, |
| 316 | ...{ |
| 317 | page: pages, |
| 318 | pages: pages, |
| 319 | percent: 100, |
| 320 | completed: true, |
| 321 | } |
| 322 | }; |
| 323 | } |
| 324 | |
| 325 | storage.set('readingProgress', readingProgress); |
| 326 | updateProgress(path); |
| 327 | |
| 328 | } |
| 329 | |
| 330 | async function unread(path) |
| 331 | { |
nothing calls this directly
no test coverage detected