From 221e63f01e06631560feaba3b4b1c44a49f840f1 Mon Sep 17 00:00:00 2001 From: Artem Chepurnoy Date: Tue, 26 Mar 2024 22:50:59 +0200 Subject: [PATCH] improvement: Sort collections in the Ownership picker by name #225 --- .../organization/OrganizationConfirmationStateProducer.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/confirmation/organization/OrganizationConfirmationStateProducer.kt b/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/confirmation/organization/OrganizationConfirmationStateProducer.kt index 18f308a5..d0a98531 100644 --- a/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/confirmation/organization/OrganizationConfirmationStateProducer.kt +++ b/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/confirmation/organization/OrganizationConfirmationStateProducer.kt @@ -262,6 +262,7 @@ fun organizationConfirmationState( val collectionsFlow = getCollections() .map { collections -> collections + .sortedWith(StringComparatorIgnoreCase { it.name }) .map { collection -> val enabled = collection.id !in args.blacklistedCollectionIds && !collection.readOnly