Skip to content

Commit

Permalink
Fix coding style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mitosagi committed Apr 3, 2020
1 parent 5b2c611 commit 067a054
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,27 +345,5 @@ private void changeLocalPlaylistName(final long id, final String name) {
.subscribe(longs -> { /*Do nothing on success*/ }, this::onError);
disposables.add(disposable);
}

private static List<PlaylistLocalItem> merge(final List<PlaylistMetadataEntry> localPlaylists,
final List<PlaylistRemoteEntity> remotePlaylists) {
List<PlaylistLocalItem> items = new ArrayList<>(
localPlaylists.size() + remotePlaylists.size());
items.addAll(localPlaylists);
items.addAll(remotePlaylists);

Collections.sort(items, (left, right) -> {
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;
}
}

0 comments on commit 067a054

Please sign in to comment.