Fixes issue with super large follow lists.

This commit is contained in:
Vitor Pamplona 2024-07-19 16:40:46 -04:00
parent d1da863d3c
commit 2b6a48f391

View File

@ -112,7 +112,7 @@ object NostrHomeDataSource : AmethystNostrDataSource("HomeFeed") {
fun createFollowMetadataAndReleaseFilter(): TypedFilter? {
val follows = account.liveHomeFollowLists.value?.users
val followSet = follows?.plus(account.userProfile().pubkeyHex)?.toList()?.ifEmpty { null }
val followSet = follows?.plus(account.userProfile().pubkeyHex)?.shuffled()?.ifEmpty { null }
return if (followSet != null) {
TypedFilter(
@ -124,7 +124,7 @@ object NostrHomeDataSource : AmethystNostrDataSource("HomeFeed") {
MetadataEvent.KIND,
AdvertisedRelayListEvent.KIND,
),
authors = followSet,
authors = followSet.take(500),
since =
latestEOSEs.users[account.userProfile()]
?.followList