Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cache restoration #71

Open
steebchen opened this issue Aug 21, 2021 · 2 comments
Open

Add cache restoration #71

steebchen opened this issue Aug 21, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@steebchen
Copy link

steebchen commented Aug 21, 2021

When re-opening the widget, it takes some time until the history is fetched. This is obviously not ideal as it takes a few seconds until the user can see the history, but it also introduces another problem, which is that it actually creates a new conversation for just that messages. Once it loads, the new conversion still appears in the admin conversations panel, but once loaded the old conversion is used.

A simple workaround for this might be to just add a loading indicator and prevent the user from sending messages until fully loaded, which would automatically prevent this bug where it creates a new conversation. Ideally it would just load faster, and that could probably be achieved by caching the chat history. Maybe the user can provide an optional store to cache the data, like a hive box (which I for example use anyway).

@aguilaair
Copy link
Collaborator

aguilaair commented Aug 21, 2021

This is linked to #56 . Closing the other issue as this seems to be a more general solution which requires less dependencies, the downside being that this implementation would require more work from the app developer and we'd have to assume the developer will store everything correctly as opposed to papercups_flutter doing the heavy lifting.

@aguilaair
Copy link
Collaborator

I currently have very limited time to work on papercups_flutter, but if anyone want to volunteer I'd be more than happy to review PRs

@aguilaair aguilaair added enhancement New feature or request help wanted Extra attention is needed labels Aug 21, 2021
@aguilaair aguilaair changed the title Improve cache restoration Add cache restoration Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants