Commit 277c3286 authored by tufteddeer's avatar tufteddeer

fix creating new playlist from "add to playlist"

(was broken by 76f37643)

Change-Id: I539f0fb8a484970dd7d22b6b4152fafaa91b0229
parent acdb194c
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment