When a user scrolls through a list of items and loads more items via the "Load More" button and then clicks on the mark all items as read button, it could happen that the request fails, because Supabase can not handle the update filter with a large list of item ids.
To avoid this error we are splitting the list of item ids provided in the "updateReadStates" into chunks of 25 items for the in clause in the update filter.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/feeddeck/feeddeck/pull/22
**Author:** [@ricoberger](https://github.com/ricoberger)
**Created:** 10/8/2023
**Status:** ✅ Merged
**Merged:** 10/8/2023
**Merged by:** [@ricoberger](https://github.com/ricoberger)
**Base:** `main` ← **Head:** `core-fix-update-of-read-status-for-large-list-of-items`
---
### 📝 Commits (1)
- [`f7efda4`](https://github.com/feeddeck/feeddeck/commit/f7efda42142621e846d52ee3459299be66a1e9cb) [core] Fix Update of Read State for Large List of Items
### 📊 Changes
**1 file changed** (+15 additions, -6 deletions)
<details>
<summary>View changed files</summary>
📝 `app/lib/repositories/items_repository.dart` (+15 -6)
</details>
### 📄 Description
When a user scrolls through a list of items and loads more items via the "Load More" button and then clicks on the mark all items as read button, it could happen that the request fails, because Supabase can not handle the update filter with a large list of item ids.
To avoid this error we are splitting the list of item ids provided in the "updateReadStates" into chunks of 25 items for the in clause in the update filter.
<!--
Keep PR title verbose enough and add prefix telling about what source it touches e.g "[rss] Add feature xyz" or if the
the PR is not realated to a source use "[core]", e.g. "[core] Fix xyz".
If you add a breaking change within your PR you should add ":warning:" to the title,
e.g. ":warning: [core] My breaking change"
-->
<!--
Description of what have been changed. Please also reference an issue, when available.
-->
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/feeddeck/feeddeck/pull/22
Author: @ricoberger
Created: 10/8/2023
Status: ✅ Merged
Merged: 10/8/2023
Merged by: @ricoberger
Base:
main← Head:core-fix-update-of-read-status-for-large-list-of-items📝 Commits (1)
f7efda4[core] Fix Update of Read State for Large List of Items📊 Changes
1 file changed (+15 additions, -6 deletions)
View changed files
📝
app/lib/repositories/items_repository.dart(+15 -6)📄 Description
When a user scrolls through a list of items and loads more items via the "Load More" button and then clicks on the mark all items as read button, it could happen that the request fails, because Supabase can not handle the update filter with a large list of item ids.
To avoid this error we are splitting the list of item ids provided in the "updateReadStates" into chunks of 25 items for the in clause in the update filter.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.