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

Reader: Wrong related post shown on rotation #14195

Closed
ashiagr opened this issue Mar 5, 2021 · 0 comments · Fixed by #15352
Closed

Reader: Wrong related post shown on rotation #14195

ashiagr opened this issue Mar 5, 2021 · 0 comments · Fixed by #15352

Comments

@ashiagr
Copy link
Contributor

ashiagr commented Mar 5, 2021

Expected behavior

Given the user is on a Reader related post screen (nested at least to 2 levels), on rotating the device, last selected related post should be shown.

Actual behavior

Given the user is on a "Reader" related post screen (nested at least to 2 levels), on rotating the device, first selected related post is shown instead of the last one.

Steps to reproduce the behavior

  1. Open a wp.com post on Reader tab.
  2. Scroll to bottom of the post details page.
  3. Notice that related posts are displayed.
  4. Click a related post.
  5. Notice that selected related post details are shown on "Related Post" screen with a cross button.
  6. Open another related post from the previous "Related Post" screen.
  7. Notice that selected related post details are shown on "Related Post" screen with a cross button.
  8. Rotate the device.
  9. Notice that first related post is shown instead of the last one.
device-2021-03-05-144135.mp4

More details in: #14194 (comment)

Tested on Pixel 5, Android 11, WPAndroid 15.9 (alpha-249)
dnalves added a commit to dnalves/WordPress-Android that referenced this issue Sep 19, 2021
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant