Set reading progress top percent

This commit is contained in:
Jackson Harper
2023-03-10 15:10:47 +08:00
parent 036040a3a0
commit cc4b07a5ed

View File

@ -50,9 +50,8 @@ export function Article(props: ArticleProps): JSX.Element {
await props.articleMutations.articleReadingProgressMutation({
id: props.articleId,
// // round reading progress to 100% if more than that
readingProgressPercent: clampToPercent(readingProgress),
readingProgressTopPercent: clampToPercent(topPositionPercent),
readingProgressTopPercent: clampToPercent(topPositionPercent * 100),
readingProgressAnchorIndex:
anchorIndex == Number.NaN ? undefined : anchorIndex,
})