mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
send page_update event if mark as unread
This commit is contained in:
parent
5b7d1bba93
commit
43fb698bdc
1 changed files with 3 additions and 2 deletions
|
|
@ -1039,8 +1039,9 @@ export const updateLibraryItemReadingProgress = async (
|
|||
}
|
||||
|
||||
const updatedItem = result[0][0]
|
||||
if (updatedItem.readingProgressBottomPercent === 100) {
|
||||
// mark item as read
|
||||
const readingProgress = updatedItem.readingProgressBottomPercent
|
||||
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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue