Playlist Sorting#392
Merged
Insprill merged 17 commits intojpochyla:masterfrom Apr 22, 2023
JonVaysman:master
Merged
Conversation
Added a dropdown icon in mod.rs. Identical to back button for now. Added a dropdown icon in icons.rs. Modified the back button SVG.
Co-authored-by: podojilr <podojilr@users.noreply.github.com>
viewing playlist detail Removed ascending and descending choice in menu. Will implement icon inversion to indicate direction Implemented context menu for multiple sorts. Default sort will be by date added.
Ensured sort button appears on first boot of application.
Add UP icon SVG
dependent on what the previous viewstate was.
playlist sorting preferences. Currently designed so that all playlists are sorted in the same manner.
Made sorting order persistent between runs.
Began implementation of Title sort.
Need to figure out how to pass preferences to playlist.rs, or sort elsewhere.
Insprill
approved these changes
Apr 22, 2023
Collaborator
Insprill
left a comment
There was a problem hiding this comment.
Thank you for the PR! Sorting the playlist locally would be better, but this works fine for now. LGTM!
12 tasks
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.
Resolves #372
I implemented the feature as described, adding an arrow that indicates descending or ascending order. You can also right click the arrow to select different sorting criteria. It defaults to date added and ascending order, which is the default order of both Spotify and Psst. I implemented the sorting criteria in Spotify, plus sorting by artist name. Sort preferences persist across playlists and across boots of the application.
A potential improvement would be to manipulate the underlying data structure of a playlist to sort the tracks, rather than just refreshing the playlist and sorting the tracks at the time they are fetched, which is what this does.
Implemented in collaboration with @podojilr