-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix reader related posts loading the wrong post after rotation #15352
Fix reader related posts loading the wrong post after rotation #15352
Conversation
… onActivityCreated This fixes wordpress-mobile#14195 `onActivityCreated` is called after `onViewCreated`, so the state was being restored after the view was ready and the post was already loaded with the wrong id.
Re-wording of the related posts issue of 18.3
Thanks @dnalves for submitting this PR! 🙇 I am doing the Code Freeze for WPAndroid 18.4 today. I'm thus moving this PR's milestone to 18.5 @jd-alexander I see you reviewed the PR previously, I'll let you decide if this needs to go in 18.4 – and in that case, we will want to update the PR to target the upcoming |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dnalves this PR was bumped to be shipped in 18.5. Could you update the release notes entry to this section? Thank you.
Otherwise from that, I tested the PR and the changes worked as expected. Good fix! I will approve and merge once the changes are made. 🚢
Done 👍 |
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
You can test the changes on this Pull Request by downloading the APKs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and working as expected. Thanks for this fix @dnalves LGTM 🚢
Fixes #14195
Issue description
There's an issue that when using the reader to see Related Posts, after going more than 2 levels deep in related posts and rotating the device, the post loaded will be the first one displayed.
Work done
I changed where the Fragment restores its state from
onActivityCreated
toonViewCreated
.onActivityCreated
is called afteronViewCreated
, so the state was being restored after the view was ready and the post was already loaded with the wrong id.To test
Video
Regression Notes
Potential unintended areas of impact
None
What I did to test those areas of impact (or what existing automated tests I relied on)
None
What automated tests I added (or what prevented me from doing so)
None. No automated tests are present for the area (just adding them should be a separate PR)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.