Case insensitive sort for subscriptions. (#292)

This commit is contained in:
Kavin 2022-06-26 03:44:07 +01:00 committed by GitHub
parent b361e7ede6
commit e8e055a676
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -980,7 +980,7 @@ public class ResponseHelper {
List<SubscriptionChannel> subscriptionItems = channels
.stream().parallel()
.sorted(Comparator.comparing(me.kavin.piped.utils.obj.db.Channel::getUploader))
.sorted(Comparator.comparing(me.kavin.piped.utils.obj.db.Channel::getUploader, String.CASE_INSENSITIVE_ORDER))
.map(channel -> new SubscriptionChannel("/channel/" + channel.getUploaderId(),
channel.getUploader(), rewriteURL(channel.getUploaderAvatar()), channel.isVerified()))
.collect(Collectors.toUnmodifiableList());