From 1ef9902ece5887b3244a355999d4d7dd98e063d3 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 21 Aug 2025 13:51:33 -0400 Subject: [PATCH] Migrates top nav list to hashtag, geohash and community lists --- .../amethyst/ui/screen/FollowListState.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/FollowListState.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/FollowListState.kt index a563316d3..9f7d4becb 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/FollowListState.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/FollowListState.kt @@ -66,7 +66,6 @@ import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.combineTransform import kotlinx.coroutines.flow.flowOn import kotlinx.coroutines.flow.stateIn -import kotlinx.coroutines.flow.transformLatest @Stable class FollowListState( @@ -160,12 +159,12 @@ class FollowListState( @OptIn(ExperimentalCoroutinesApi::class) val liveKind3FollowsFlow: Flow> = - account.kind3FollowList.flow.transformLatest { + combineTransform(account.kind3FollowList.flow, account.hashtagList.flow, account.geohashList.flow, account.communityList.flow) { kind3List, hashtagList, geotagList, communityList -> checkNotInMainThread() val communities = - it.communities.mapNotNull { - LocalCache.checkGetOrCreateAddressableNote(it)?.let { communityNote -> + communityList.mapNotNull { + LocalCache.getOrCreateAddressableNote(it.address).let { communityNote -> TagFeedDefinition( "Community/${communityNote.idHex}", CommunityName(communityNote), @@ -178,7 +177,7 @@ class FollowListState( } val hashtags = - it.hashtags.map { + hashtagList.map { TagFeedDefinition( "Hashtag/$it", HashtagName(it), @@ -190,7 +189,7 @@ class FollowListState( } val geotags = - it.geotags.map { + geotagList.map { TagFeedDefinition( "Geohash/$it", GeoHashName(it),