Merge pull request #3005 from omnivore-app/fix/web-force-pdf-read-position

On web always set PDF position to the last viewed page
This commit is contained in:
Jackson Harper 2023-10-24 17:31:12 +08:00 committed by GitHub
commit f3ac6613d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -408,11 +408,9 @@ export default function PdfArticleContainer(
100,
Math.max(0, ((pageIndex + 1) / instance.totalPageCount) * 100)
)
if (percent <= props.article.readingProgressPercent) {
return
}
await articleReadingProgressMutation({
id: props.article.id,
force: true,
readingProgressPercent: percent,
readingProgressAnchorIndex: pageIndex,
})

View file

@ -3,6 +3,7 @@ import { gqlFetcher } from '../networkHelpers'
export type ArticleReadingProgressMutationInput = {
id: string
force?: boolean
readingProgressPercent?: number
readingProgressTopPercent?: number
readingProgressAnchorIndex?: number