From 133dc4a69c0d9dd10385977f05f7e25b9e49bb7a Mon Sep 17 00:00:00 2001 From: Balazs Toldi Date: Sat, 6 Jan 2024 11:20:30 +0100 Subject: [PATCH] Fix "Old" sort type for multi communities --- .../multicommunity/MultiCommunityPostPagingSource.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/kotlin/eu/toldi/infinityforlemmy/multicommunity/MultiCommunityPostPagingSource.kt b/app/src/main/kotlin/eu/toldi/infinityforlemmy/multicommunity/MultiCommunityPostPagingSource.kt index 769ecb7c..f702fb03 100644 --- a/app/src/main/kotlin/eu/toldi/infinityforlemmy/multicommunity/MultiCommunityPostPagingSource.kt +++ b/app/src/main/kotlin/eu/toldi/infinityforlemmy/multicommunity/MultiCommunityPostPagingSource.kt @@ -12,6 +12,7 @@ import eu.toldi.infinityforlemmy.post.Post import eu.toldi.infinityforlemmy.post.enrich.PostEnricher import eu.toldi.infinityforlemmy.postfilter.PostFilter import eu.toldi.infinityforlemmy.utils.MultiCommunityUtils.sortByNewest +import eu.toldi.infinityforlemmy.utils.MultiCommunityUtils.sortByOldest import eu.toldi.infinityforlemmy.utils.MultiCommunityUtils.sortByScore import retrofit2.HttpException import retrofit2.Response @@ -79,6 +80,10 @@ class MulticommunityPagingSource( sortByNewest(combinedPosts) } + SortType.Type.OLD -> { + sortByOldest(combinedPosts) + } + SortType.Type.TOP_ALL, SortType.Type.TOP_YEAR, SortType.Type.TOP_NINE_MONTHS, SortType.Type.TOP_SIX_MONTHS, SortType.Type.TOP_THREE_MONTHS, SortType.Type.TOP_MONTH, SortType.Type.TOP_WEEK, SortType.Type.TOP_DAY, SortType.Type.TOP_TWELVE_HOURS, SortType.Type.TOP_SIX_HOURS, SortType.Type.TOP_HOUR -> sortByScore(combinedPosts)