send page_update event if mark as unread
This commit is contained in:
@ -1039,8 +1039,9 @@ export const updateLibraryItemReadingProgress = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const updatedItem = result[0][0]
|
const updatedItem = result[0][0]
|
||||||
if (updatedItem.readingProgressBottomPercent === 100) {
|
const readingProgress = updatedItem.readingProgressBottomPercent
|
||||||
// mark item as read
|
if (readingProgress === 0 || readingProgress === 100) {
|
||||||
|
// only send PAGE_UPDATED event if users mark item as read or unread
|
||||||
await pubsub.entityUpdated<ItemEvent>(EntityType.ITEM, updatedItem, userId)
|
await pubsub.entityUpdated<ItemEvent>(EntityType.ITEM, updatedItem, userId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user