Skip to content

Fix/playlist sort direction#2786

Merged
mostafaalagamy merged 2 commits intoMetrolistGroup:mainfrom
adrielGGmotion:fix/playlist-sort-direction
Feb 14, 2026
Merged

Fix/playlist sort direction#2786
mostafaalagamy merged 2 commits intoMetrolistGroup:mainfrom
adrielGGmotion:fix/playlist-sort-direction

Conversation

@adrielGGmotion
Copy link
Contributor

Summary

Fixes #2779 by separating the playlist sort direction preference between the library screen and the "Add to Playlist" popup.

Problem

The library screen and "Add to Playlist" popup were sharing the same preference key playlistSortDescending. This meant:

  • Changing sort direction in the popup would unexpectedly change the library view
  • Users had to re-sort their library every time they added a song to a playlist

Solution

Changed line 154 in PreferenceKeys.kt to use a unique preference key:

  • Before: booleanPreferencesKey("playlistSortDescending") (shared)
  • After: booleanPreferencesKey("addToPlaylistSortDescending") (unique)

Testing

  1. Go to Library → Playlists, sort by "Name" (ascending)
  2. Pick any song → "Add to Playlist"
  3. In popup, change sort to "Creation Date" (descending)
  4. Close popup and return to Library
  5. Expected: Library still shows "Name" (ascending) - independent from popup

Checklist

…t dialog

Fixes MetrolistGroup#2779 - the library screen and 'Add to Playlist' popup were sharing
the same preference key 'playlistSortDescending'. Changed to unique key
'addToPlaylistSortDescending' so they can be sorted independently.
@adrielGGmotion
Copy link
Contributor Author

That's my favorite pull request because that was the easier one

@mostafaalagamy mostafaalagamy merged commit cb9672f into MetrolistGroup:main Feb 14, 2026
@diam0ndkiller
Copy link

Thanks a ton! It's those simple fixes that really show the benefits of Open Source :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Playlist sort direction linked between library screen and "Add to Playlist" popup

3 participants