Pool-Of-Tears / Myne

An android app to download & read ebooks from Project Gutenberg, built with Jetpack Compose.
https://pooloftears.in
Apache License 2.0
1.09k stars 63 forks source link

Wrong list position #153

Closed valiantyan closed 5 months ago

valiantyan commented 5 months ago

The home list slides, switches CustomBottomNavigationItem and then returns to the home page and finds that the list position starts from 0

starry-shivam commented 5 months ago

I don't understand what you mean. Could you please clarify? Also, could you follow the issue template and reopen this issue with the appropriate details and information? Thanks!

valiantyan commented 5 months ago

https://github.com/Pool-Of-Tears/Myne/assets/5484163/54570c07-248f-4eb0-94a4-8c290e493489

Slide the list in Categories to crime, then switch to Library, and then switch back to Categories. The position of the list is now animal.

starry-shivam commented 5 months ago

This seems like an expected behavior. It doesn't store the position or data of this screen in the backstack because it's not particularly long. Additionally, on most modern phones, screens are large enough that scrolling isn't required very often. Therefore, storing the state of the screen would seem like a waste of memory.

valiantyan commented 5 months ago

But the HomeScreen page is the same.

starry-shivam commented 5 months ago

Yeah you're right, I'll try to fix the issue with homescreen in next release

valiantyan commented 5 months ago

Thanks, I am also a jetpack compose beginner. Hope to learn more

starry-shivam commented 5 months ago

@yanhaoSeven I've released a small update to address this issue.

valiantyan commented 5 months ago

launchSingleTop = true good