From 4b42d2ed386249f0fb964e73bb0d2a93c6c7733d Mon Sep 17 00:00:00 2001 From: Mark Bestavros Date: Fri, 31 May 2024 03:16:50 -0400 Subject: [PATCH] feat(greader): sort categories alphabetically during sync (#700) Signed-off-by: Mark Bestavros --- .../java/me/ash/reader/domain/service/GoogleReaderRssService.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/me/ash/reader/domain/service/GoogleReaderRssService.kt b/app/src/main/java/me/ash/reader/domain/service/GoogleReaderRssService.kt index 15713d950..6fd0292de 100644 --- a/app/src/main/java/me/ash/reader/domain/service/GoogleReaderRssService.kt +++ b/app/src/main/java/me/ash/reader/domain/service/GoogleReaderRssService.kt @@ -229,6 +229,7 @@ class GoogleReaderRssService @Inject constructor( // 2. Fetch folder and subscription list googleReaderAPI.getSubscriptionList() .subscriptions.groupBy { it.categories?.first() } + .toSortedMap { c1, c2 -> c1?.label.toString().compareTo(c2?.label.toString()) } .forEach { (category, feeds) -> val groupId = accountId.spacerDollar(category?.id?.ofCategoryStreamIdToId()!!)