mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
skip sending item update event for reading progress update
This commit is contained in:
parent
e67298980c
commit
d31eb7a88b
2 changed files with 2 additions and 17 deletions
|
|
@ -643,8 +643,7 @@ export const saveArticleReadingProgressResolver = authorized<
|
|||
uid,
|
||||
readingProgressPercent,
|
||||
readingProgressTopPercent,
|
||||
readingProgressAnchorIndex,
|
||||
pubsub
|
||||
readingProgressAnchorIndex
|
||||
)
|
||||
if (!updatedItem) {
|
||||
return { errorCodes: [SaveArticleReadingProgressErrorCode.BadData] }
|
||||
|
|
|
|||
|
|
@ -739,8 +739,7 @@ export const updateLibraryItemReadingProgress = async (
|
|||
userId: string,
|
||||
bottomPercent: number,
|
||||
topPercent: number | null = null,
|
||||
anchorIndex: number | null = null,
|
||||
pubsub = createPubSubClient()
|
||||
anchorIndex: number | null = null
|
||||
): Promise<LibraryItem | null> => {
|
||||
// If we have a top percent, we only save it if it's greater than the current top percent
|
||||
// or set to zero if the top percent is zero.
|
||||
|
|
@ -787,19 +786,6 @@ export const updateLibraryItemReadingProgress = async (
|
|||
}
|
||||
|
||||
const updatedItem = result[0][0]
|
||||
await pubsub.entityUpdated<QueryDeepPartialEntity<LibraryItem>>(
|
||||
EntityType.PAGE,
|
||||
{
|
||||
id,
|
||||
readingProgressBottomPercent: updatedItem.readingProgressBottomPercent,
|
||||
readingProgressTopPercent: updatedItem.readingProgressTopPercent,
|
||||
readingProgressHighestReadAnchor:
|
||||
updatedItem.readingProgressHighestReadAnchor,
|
||||
readAt: updatedItem.readAt,
|
||||
},
|
||||
userId
|
||||
)
|
||||
|
||||
return updatedItem
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue