-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Use OnyxUpdateManager to fetch pending updates from server #54257
base: main
Are you sure you want to change the base?
feat: Use OnyxUpdateManager to fetch pending updates from server #54257
Conversation
…payload was too big
@eVoloshchak Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Hey @chrispader thanks for the PR, would you mind filling the PR checklist please? |
@chrispader @eVoloshchak any updates on this one? |
I'm working on testing the changes with actual notifications right now. Will finalize the checklist in an hour or so. |
@rlinoz are we able to test this with the actual flag from the backend yet? Mutating the notifications on receiving locally, it looks like everything is working fine! |
@rlinoz also, do we need screenshots for this PR? I'm not sure what to add there. |
I'm currently working on adding some tests for this new feature. |
Yeah, I don't think screenshots make sense here As for testing, yeah, the flag is already in production, I think all you gotta do is send a really long message which will make us drop the onyxData in the push notification |
Thanks! Will try that :)
I'm still going to add some simple unit tests, because we already have a relatively solid test suite for the |
@rlinoz the new tests are working and the flag is also working on a real physical device with notifications already! 🎉 From my side, the PR is ready to be reviewed and merged! Here's a screenshot of the logs after the app has been opened after the notification has been received: |
I've slightly re-factored the test suite for the |
Thanks a lot, I will to review today/tomorrow morning @eVoloshchak are you able to review this one? 😄 Then I can assign you to the original issue. |
@rlinoz
Explanation of Change
Implements handling of a
hasPendingOnyxUpdates
flag, which triggers a re-fetching of newer updates from the backend. This flag is set to true, when the onyx updates would exceed the push notification payload limit.If
hasPendingOnyxUpdates
is true, this will triggerOnyxUpdateManager
which fill fetch the latest updates up to thelastPendingUpdateID
.Fixed Issues
$ #53643
PROPOSAL:
Tests
hasPendingOnyxUpdate
flag set to true, by sending a message from another user or mocking the push notification from the backendGetMissingOnyxMessages
query up to the last pending update ID is sent to the backend.Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop