ankidroid/Anki-Android

Screen rotate while Previewing, returns to the first card again

Closed this issue · 2 comments

Reproduction Steps
  1. While previewing cards
  2. when i screen rotate
  3. goes back to preview first card
Expected Result

only screen rotate present previewing card without going back to first card

Actual Result

preview reverts back to first card again

Debug info

Refer to the support page if you are unsure where to get the "debug info".

Research

Enter an [ x ] character to confirm the points below:

[ ] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid

[ ] I have checked the manual and the FAQ and could not find a solution to my issue

[ ] I have searched for similar existing issues here and on the user forum

I think this should be easy based on what I know - my guess is that the Previewer is not correctly saving and reloading it's state in onSaveInstance/onCreate - as it is an Activity and those are actually destroyed / recreated in response to configuration changes. Might be as simple as just adding the current page number as another item that goes in and out of the bundle in that process

@moqi-Git wins the internet points today 🏆 by fixing this in #5693 - thank you @moqi-Git ! @ronved if you follow the process to sign up for alphas, you'll see this fixed in the next one: https://docs.ankidroid.org/manual.html#betaTesting