Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 277c3286 authored by tufteddeer's avatar tufteddeer
Browse files

fix creating new playlist from "add to playlist"

(was broken by 76f37643)

Change-Id: I539f0fb8a484970dd7d22b6b4152fafaa91b0229
parent acdb194c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1427,7 +1427,6 @@ public final class MusicUtils {
     */
    public static List<String> makePlaylist(final Context context) {
        final List<String> menuItemMap = new ArrayList<>();
        menuItemMap.add(context.getString(R.string.new_playlist));

        try (final Cursor cursor = PlaylistLoader.makePlaylistCursor(context)) {
            if (cursor != null && cursor.getCount() > 0 && cursor.moveToFirst()) {
@@ -1443,6 +1442,9 @@ public final class MusicUtils {

        // sort the list but ignore case
        Collections.sort(menuItemMap, new IgnoreCaseComparator());
        // add new_playlist to the top of the sorted list
        menuItemMap.add(0, context.getString(R.string.new_playlist));

        return menuItemMap;
    }