add a "insertedBefore" field to mark as read requests to make sure the user does not mark entries that were fetched but never seen before (fixes a regression from #1007)

This commit is contained in:
Athou
2023-12-29 13:30:14 +01:00
parent 39ba4a1c97
commit f845f225cf
8 changed files with 41 additions and 32 deletions

View File

@@ -113,6 +113,7 @@ export interface MarkRequest {
id: string
read: boolean
olderThan?: number
insertedBefore?: number
keywords?: string
excludedSubscriptions?: number[]
}

View File

@@ -279,7 +279,8 @@ export function FeedEntries() {
req: {
id: source.id,
read: true,
olderThan: entriesTimestamp,
olderThan: Date.now(),
insertedBefore: entriesTimestamp,
},
})
)

View File

@@ -27,7 +27,8 @@ export function MarkAllAsReadButton(props: { iconSize: number }) {
req: {
id: source.id,
read: true,
olderThan: entriesTimestamp,
olderThan: Date.now(),
insertedBefore: entriesTimestamp,
},
})
)
@@ -78,7 +79,8 @@ export function MarkAllAsReadButton(props: { iconSize: number }) {
req: {
id: source.id,
read: true,
olderThan: entriesTimestamp - threshold * 24 * 60 * 60 * 1000,
olderThan: Date.now() - threshold * 24 * 60 * 60 * 1000,
insertedBefore: entriesTimestamp,
},
})
)