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

feat: communicate store changes from background processing #342

Merged
merged 5 commits into from
Feb 18, 2025

Conversation

boxdot
Copy link
Collaborator

@boxdot boxdot commented Feb 17, 2025

A background processing task fetches new messages and stores them in the
database. This task is triggered by push notifications.

This commit introduces a store notifications queue. The background task
stores in the queue any changes made to the store in the background.
When the foreground application reconnects to the websocket, it dequeues
the pending store notifications and communicates them to the UI so it
can update its state.

Note: This fix is not cancel-safe, see #345.

Fixes #337

A background processing task fetches new messages and stores them in the
database. This task is triggered by push notifications.

This commit introduces a store notifications queue. The background task
stores in the queue any changes made to the store in the background.
When the foreground application reconnects to the websocket, it dequeues
the pending store notifications and communicates them to the UI so it
can update its state.

Fixes #337
Copy link
Contributor

@raphaelrobert raphaelrobert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@boxdot boxdot merged commit c287e8e into main Feb 18, 2025
16 checks passed
@boxdot boxdot deleted the dima/store-notification-queue branch February 18, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restoring App from background does not show received messages
2 participants