Bartuzen / qBitController

Control qBittorrent from your Android device
GNU General Public License v3.0
493 stars 11 forks source link

Reversing sort from top of list puts you at bottom of list instead of staying on top #49

Closed Pentaphon closed 1 year ago

Pentaphon commented 1 year ago

Bug description

1) Scroll to the very top of the list with the smallest file sorted by size, press the "reverse" checkmark. 2) Notice how you are magically scrolled to the very bottom of the list with the smallest instead of the very top where you previously were. 3) Now you have to scroll all the way back up to get to the biggest file.

This may just be intended but it isn't as useful since sorting should keep me where I was on the list before so I can see the biggest files instead of the smallest files instead of scrolling down with the smallest files.

You'd expect the list to sort and keep you at the top to see the biggest file at the top but now you are forced to scroll back up to the top of the list to see the biggest file at the very top of the torrent list. Not sure why this happens. Very jarring. Please let me know if my directions were clear enough.

Logs

No response

qBitController version

0.6.0

qBittorrent version

4.5.2

Android version

10

Additional details

No response

Bartuzen commented 1 year ago

That's because it tries to keep first visible item still visible after list is updated. It seems like there is no way to just disable this behaviour. But we can store scroll position before list is updated and restore it after the update.

Pentaphon commented 1 year ago

But we can store scroll position before list is updated and restore it after the update.

That works for me! Thanks.