Merge pull request #3345 from mitosagi/error-with-bookmarks
Fix repeated exceptions in Bookmarked Playlists
This commit is contained in:
commit
cd53518897
|
@ -62,8 +62,19 @@ public final class BookmarkFragment extends BaseLocalListFragment<List<PlaylistL
|
||||||
items.addAll(localPlaylists);
|
items.addAll(localPlaylists);
|
||||||
items.addAll(remotePlaylists);
|
items.addAll(remotePlaylists);
|
||||||
|
|
||||||
Collections.sort(items, (left, right) ->
|
Collections.sort(items, (left, right) -> {
|
||||||
left.getOrderingName().compareToIgnoreCase(right.getOrderingName()));
|
String on1 = left.getOrderingName();
|
||||||
|
String on2 = right.getOrderingName();
|
||||||
|
if (on1 == null && on2 == null) {
|
||||||
|
return 0;
|
||||||
|
} else if (on1 != null && on2 == null) {
|
||||||
|
return -1;
|
||||||
|
} else if (on1 == null && on2 != null) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return on1.compareToIgnoreCase(on2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue