Whiteboard data loss when theme switch[Bug]
Reproduction Steps
- The whiteboard draw option
- when pen is used
- And then night mode is switched, the whiteboard gets cleared
Actual Result

Expected Result
Caching of the whiteboard data
Debug info
I am ready to work on this , probably can be done by saving data as svg before changing the theme.
Possible changes in restartActivityInvalidateBackstack function
Research
Enter an [x] character to confirm the points below:
- [x] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
- [x] I have checked the manual and the FAQ and could not find a solution to my issue
- [x] I have searched for similar existing issues here and on the user forum
- [x] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
This is a special case of #3654 - that issue has info on how to easily reproduce
I am thinking for an alternative way, this will allow the restart of the app but with all datas intact , the coordinates of the drawing areeas can be added to sql lite
@david-allison-1 what are your views on this?
My understanding is that we don't lose memory when the theme is switched. The whiteboard is a small quantity of data which shouldn't be enough to require persistent storage via SQLite and associated complexity.
I expect that we can serialise the path or keep it in memory and redraw it given this data once the theme has been changed. There should be code in the codebase which does similar for variables.
Making sure it works across Activity restarts is good enough, and making sure all Activities work across Activity restarts (can be tested by turning off keep activities in developer settings) is much much more important than trying to save whiteboard data across Application restarts. I'm not sure that's even a feature people would want?
Let's leave that for now and focus on Activity restart correctness - e.g. #3654
Yes I agree, we can work as an add-on if user requests it.For now its better to focus more on restart of all activity when theme changes.
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Solved with the new whiteboard