SimonHalvdansson / Harmonic-HN

Modern Android client for Hacker News
https://play.google.com/store/apps/details?id=com.simon.harmonichackernews
Apache License 2.0
620 stars 39 forks source link

App loses scroll position on some configuration changes #58

Open AppearamidGuy opened 1 year ago

AppearamidGuy commented 1 year ago

App doesn't handle all configuration changes correctly, for example enabling battery saving mode.

Orientation and screen size changes are handled without activity recreation that results in the lost scroll, but it is still recreated in other cases. Also, disabling activity recreation is not recommended. Instead you should use ViewModels to keep data during configuration change and OS will usually handle the UI part