feat: support fetching encoded collab in batch from memory #837
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, there is no options for retrieving encoded collab in batch from the in-memory collab, unlike the fetch single collab counter part.
This is less of a problem for the flutter app, because we do have a websocket client which will eventually sync every collab to the latest, even if the initially fetched data might be outdated.
For AppFlowy Web, however, the changes are pull when the data is refreshed, and there is no websocket client there to keep the state of the collab to the latest. Hence, in cases where the user has a database, changes to the content of the database will not be reflected immediately on the web version of AppFlowy, because the content is fetched via the batch get encoded collab method.
Therefore, an option has been added to the batch get encoded collab method, for the storage class. The existing API will still behave as status quo, and doesn't fetch the encoded collab from in-memory. The get page view API will be affected.