do not update db immediately for force update of reading progress

This commit is contained in:
Hongbo Wu
2024-02-05 16:56:48 +08:00
parent dde80091b4
commit 37c75865d1

View File

@ -624,23 +624,6 @@ export const saveArticleReadingProgressResolver = authorized<
// update reading progress without checking the current value, also
// clear any cached values.
await clearCachedReadingPosition(uid, id)
const updatedItem = await updateLibraryItem(
id,
{
readingProgressBottomPercent: readingProgressPercent,
readingProgressTopPercent: readingProgressTopPercent ?? undefined,
readingProgressHighestReadAnchor:
readingProgressAnchorIndex ?? undefined,
readAt: new Date(),
},
uid,
pubsub
)
return {
updatedArticle: libraryItemToArticle(updatedItem),
}
}
let updatedItem: LibraryItem | null