From 4c535147f1cfa56c6284c8359d12935479df88c0 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 18 Mar 2022 14:50:08 +0800 Subject: [PATCH] round reading progress to 100% if more than that round reading progress to 100% if more than that round reading progress to 100% if more than that --- packages/web/components/templates/article/Article.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/web/components/templates/article/Article.tsx b/packages/web/components/templates/article/Article.tsx index 60de8c24b..f02be67c2 100644 --- a/packages/web/components/templates/article/Article.tsx +++ b/packages/web/components/templates/article/Article.tsx @@ -66,7 +66,8 @@ export function Article(props: ArticleProps): JSX.Element { if (!readingProgress) return await articleReadingProgressMutation({ id: props.articleId, - readingProgressPercent: readingProgress, + // round reading progress to 100% if more than that + readingProgressPercent: readingProgress > 100 ? 100 : readingProgress, readingProgressAnchorIndex: readingAnchorIndex, }) })()