Skip to content

Commit

Permalink
fix: mark all read with reverse ordering
Browse files Browse the repository at this point in the history
Signed-off-by: Wolfgang <[email protected]>
  • Loading branch information
wofferl committed Oct 5, 2024
1 parent f374fed commit 300798b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ export const actions = {
{ commit }: ActionParams<FeedState>,
{ feed }: { feed: Feed },
) {
// want to fetch feed so that we can retrieve the "highestItemId"
// want to fetch feed so that we can retrieve the "newestItemId"
const response = await ItemService.fetchFeedItems(feed.id as number)
await FeedService.markRead({ feedId: feed.id as number, highestItemId: response.data.items[0].id })
await FeedService.markRead({ feedId: feed.id as number, highestItemId: response.data.newestItemId })

if (feed.folderId) {
commit(FOLDER_MUTATION_TYPES.MODIFY_FOLDER_UNREAD_COUNT, { folderId: feed.folderId, delta: -feed.unreadCount })
Expand Down

0 comments on commit 300798b

Please sign in to comment.