From 55a1cdb1c79c8ca7e2f42ecfca4aabd01d4df2e1 Mon Sep 17 00:00:00 2001 From: FourTOne5 <59261191+FourTOne5@users.noreply.github.com> Date: Tue, 3 May 2022 18:45:34 +0600 Subject: [PATCH] Case insensitive sort in Source tab (#7067) --- .../eu/kanade/domain/source/interactor/GetEnabledSources.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/domain/source/interactor/GetEnabledSources.kt b/app/src/main/java/eu/kanade/domain/source/interactor/GetEnabledSources.kt index 05e681b042..5ed938a320 100644 --- a/app/src/main/java/eu/kanade/domain/source/interactor/GetEnabledSources.kt +++ b/app/src/main/java/eu/kanade/domain/source/interactor/GetEnabledSources.kt @@ -27,7 +27,7 @@ class GetEnabledSources( sources .filter { it.lang in enabledLanguages || it.id == LocalSource.ID } .filterNot { it.id.toString() in disabledSources } - .sortedBy { it.name } + .sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER) { it.name }) .flatMap { val flag = if ("${it.id}" in pinnedSourceIds) Pins.pinned else Pins.unpinned val source = it.copy(pin = flag)