Add support for scrolling up/down when album list is active#128
Conversation
Owner
|
Thanks for taking a crack at this. I think I've got things into a bit of a mess with regards to pagination (managing page index, scroll, index etc.). There's a half baked attempt to clean this up, using a more generic struct (see I've got a better understanding of how this should work now and do intend to clean this up. With regards to your comments, you're right about not pushing to the stack when fetching the next page. Pushing to the stack only needs to happen the first time we want to navigate to that view. |
nighi
pushed a commit
to nighi/spotify-tui
that referenced
this pull request
Jul 11, 2025
Add support for scrolling up/down when album list is active
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is related to #11
ctrl+d/ushould scroll through pages but this has been implemented in "Liked Songs" view only. In this PR, I tried to implement scrolling down/up in the "Albums" view.need to confirm:
In
src/app.rs, I added three methods (get_current_user_saved_albums,get_current_user_saved_albums_next, andget_current_user_saved_albums_previous) forApp. These methods are imitation of**saved_tracks**methods. Althoughpush_navigation_stackis called inget_current_user_saved_tracks, I did NOT callpush_navigation_stackinget_current_user_saved_albums. Ifpush_navigation_stackis called after each page scrolling, same contents are pushed into the stack. Scrolling pages several time, q key (go back) seems foul-up. This behavior seems a bug for me so I did not callpush_navigation_stackinget_current_user_saved_albums.