Skip to content

[FEATURE REQUEST] Maintain scroll position in file list #4528

Open

Description

@suterma

Is your feature request related to a problem? Please describe.
When drilling down larger file hierarchies, e.g. in my large music library, and then backing up a level, the scroll position is lost.
E.g. I would go to Zap Mama/Seven/mp3/01-Jogging in Tombouctu.mp3, then back up (using the android back button or the app's own back button) to the Artist level (Zap Mama), the view starts with the first entry on top again, e.g. Aaron Nevile. It would take quite some time to scroll back down to a later artist, e.g. Züri West.

Describe the solution you'd like
The scroll position should be kept for each folder/directory level separately.

Describe alternatives you've considered
I always need to scroll, or I would make a deliberately steeper hierarchy, which is really just a workaround.

Additional context
Try for yourself with a large, flat hierarchy, the problem is obvious. This has never altered for years, so it's not really a (regressing) bug, but it heavily hampers the user experience for power users.

TASKS

  • Research (if needed)
  • Create branch feature/feature_name
  • Development tasks
    • Implement whatever
    • ...
    • Implement unit tests (if needed)
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/feature_name into master

Activity

  1. jesmrec commented on Jan 9, 2025

    @jesmrec
    Member

    Thanks for opening!! it sounds like an interesting improvement, we will take a look and also we'll encourage community to take part

  2. added this to the Backlog milestone on Jan 10, 2025
  3. goonerDroid commented on Apr 10, 2025

    @goonerDroid
    Contributor

    @jesmrec @JuancaG05 Will be picking this up, however I need some demo server URL to test, I tried using the below but it fails to load the page or gives me an network exception

    https://ocis.ocis.master.owncloud.works
    user: einstein, password: relativity

    I tried creating my own server using docker but but that too somehow is not working today. if there is an testing URL, would be really helpful. Thanks

  4. jesmrec commented on Apr 10, 2025

    @jesmrec
    Member

    @goonerDroid try with:

    demo.owncloud.com (katherine/gemini)

  5. goonerDroid commented on Apr 10, 2025

    @goonerDroid
    Contributor

    @JuancaG05 I was able to reproduce this issue and have implemented a working solution. The approach involves saving the lastVisibleItemPosition of the RecyclerView in MainFileListFragment just before fileListAdapter.updateFileList() is called. After the adapter is updated, I restore the scroll position using scrollToPos(). This ensures that the scroll position is preserved even when navigating into deeper file hierarchies.

    I have one quick question — what would be the appropriate naming convention for this branch? Should it be prefixed with feature, fix, or improvement?

  6. JuancaG05 commented on Apr 11, 2025

    @JuancaG05
    Contributor

    Hi @goonerDroid! Thanks a lot for willing to take part of the product with your valuable contributions! 💯

    You can open a PR with your proposed solution and I will take a deeper look there 😃. About the naming convention for the branch, I would call it feature/..., since this is a new functionality we are adding 👍.

  7. changed the title [-][FEATURE REQUEST] When going back up a level, after drilling down a file hierarchy, the view looses it's scroll position.[/-] [+][FEATURE REQUEST] Maintain scroll position in file list[/+] on Apr 14, 2025
  8. self-assigned this
    on Apr 14, 2025
  9. modified the milestones: Backlog, 4.7 - Next on Jun 6, 2025
  10. modified the milestones: 4.7 - Current, Backlog on Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions