Skip to content

Commit

Permalink
Merge pull request #10909 from Stypox/fix-getAudioTrackType-null
Browse files Browse the repository at this point in the history
Fix not considering nullability when comparing getAudioTrackType
  • Loading branch information
Stypox authored Mar 28, 2024
2 parents e0268a9 + 3a014d8 commit 81220f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/org/schabi/newpipe/util/ListHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ private static Comparator<AudioStream> getAudioTrackNameComparator(

return Comparator.comparing(AudioStream::getAudioLocale, Comparator.nullsLast(
Comparator.comparing(locale -> locale.getDisplayName(appLoc))))
.thenComparing(AudioStream::getAudioTrackType);
.thenComparing(AudioStream::getAudioTrackType, Comparator.nullsLast(
Comparator.naturalOrder()));
}
}

0 comments on commit 81220f9

Please sign in to comment.