Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-apps-Eleven: Commit

packages/apps/Eleven


Commit MetaInfo

Revision277c3286878ecbd96d169bb7ebf50f70595ddcf8 (tree)
Time2019-05-07 00:25:49
Authortufteddeer <tufteddeer@prot...>
Commitertufteddeer

Log Message

fix creating new playlist from "add to playlist"

(was broken by 76f3764)

Change-Id: I539f0fb8a484970dd7d22b6b4152fafaa91b0229

Change Summary

Incremental Difference

--- a/src/org/lineageos/eleven/utils/MusicUtils.java
+++ b/src/org/lineageos/eleven/utils/MusicUtils.java
@@ -1427,7 +1427,6 @@ public final class MusicUtils {
14271427 */
14281428 public static List<String> makePlaylist(final Context context) {
14291429 final List<String> menuItemMap = new ArrayList<>();
1430- menuItemMap.add(context.getString(R.string.new_playlist));
14311430
14321431 try (final Cursor cursor = PlaylistLoader.makePlaylistCursor(context)) {
14331432 if (cursor != null && cursor.getCount() > 0 && cursor.moveToFirst()) {
@@ -1443,6 +1442,9 @@ public final class MusicUtils {
14431442
14441443 // sort the list but ignore case
14451444 Collections.sort(menuItemMap, new IgnoreCaseComparator());
1445+ // add new_playlist to the top of the sorted list
1446+ menuItemMap.add(0, context.getString(R.string.new_playlist));
1447+
14461448 return menuItemMap;
14471449 }
14481450
Show on old repository browser