Offline Support : Post List - Fix Upload Status Cache issue - #11472
Conversation
|
You can test the changes on this Pull Request by downloading the APK here. |
malinajirka
left a comment
There was a problem hiding this comment.
Good catch @jd-alexander! Thank you for the fix. I've tested the changes and it works as expected.
I think we might want to consider making the uploadStatusTracker private and passing the tracker within the postListViewModelConnector for consistency. I didn't want to push commits into your PR and I wanted to speed things up. I tried this approach in move-tracker-to-connector branch. If you agree with the changes, feel free to merge them into issue-11471/post_list_upload_status_tracker.
I'm approving this PR. Feel free to merge it. I'm leaving the decision if you want to merge my branch to you.
…issue-11471/post_list_upload_status_tracker
|
The connected test has been failing even on other branches so I think we shouldn't block this PR on it -> 🚢 |
Fixes #11471
Findings
A new instance of
PostModelUploadStatusTrackerwas being created in multiple components which resulted in out of sync caches.Solution
Similarly to #11315, A single instance of
PostModelUploadStatusTrackeris being injected into PostListMainViewModel and all child VMs are utilizing it. This resolves the scoping issue and ensures the cache for all components are up to date.Testing
Reviewing
Only 1 reviewer is needed but anyone can review.
Submitter Checklist
RELEASE-NOTES.txtif necessary.