Improves starting value of flows
This commit is contained in:
+1
-1
@@ -68,7 +68,7 @@ class PrivateStorageRelayListState(
|
|||||||
.stateIn(
|
.stateIn(
|
||||||
scope,
|
scope,
|
||||||
SharingStarted.Eagerly,
|
SharingStarted.Eagerly,
|
||||||
emptySet(),
|
normalizePrivateOutboxRelayListWithBackup(getPrivateOutboxRelayListNote()),
|
||||||
)
|
)
|
||||||
|
|
||||||
fun saveRelayList(
|
fun saveRelayList(
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ class FollowListState(
|
|||||||
@OptIn(ExperimentalCoroutinesApi::class)
|
@OptIn(ExperimentalCoroutinesApi::class)
|
||||||
private val innerFlow: Flow<Kind3Follows> =
|
private val innerFlow: Flow<Kind3Follows> =
|
||||||
getFollowListFlow().transformLatest {
|
getFollowListFlow().transformLatest {
|
||||||
emit(buildKind3Follows(it.user.latestContactList))
|
emit(buildKind3Follows(it.user.latestContactList ?: settings.backupContactList))
|
||||||
}
|
}
|
||||||
|
|
||||||
val flow =
|
val flow =
|
||||||
|
|||||||
+1
-2
@@ -29,7 +29,6 @@ import com.vitorpamplona.amethyst.model.topNavFeeds.allFollows.AllFollowsFeedFlo
|
|||||||
import com.vitorpamplona.amethyst.model.topNavFeeds.aroundMe.AroundMeFeedFlow
|
import com.vitorpamplona.amethyst.model.topNavFeeds.aroundMe.AroundMeFeedFlow
|
||||||
import com.vitorpamplona.amethyst.model.topNavFeeds.global.GlobalFeedFlow
|
import com.vitorpamplona.amethyst.model.topNavFeeds.global.GlobalFeedFlow
|
||||||
import com.vitorpamplona.amethyst.model.topNavFeeds.noteBased.NoteFeedFlow
|
import com.vitorpamplona.amethyst.model.topNavFeeds.noteBased.NoteFeedFlow
|
||||||
import com.vitorpamplona.amethyst.model.topNavFeeds.noteBased.author.AuthorsByOutboxTopNavFilter
|
|
||||||
import com.vitorpamplona.amethyst.model.topNavFeeds.unknown.UnknownFeedFlow
|
import com.vitorpamplona.amethyst.model.topNavFeeds.unknown.UnknownFeedFlow
|
||||||
import com.vitorpamplona.amethyst.service.location.LocationState
|
import com.vitorpamplona.amethyst.service.location.LocationState
|
||||||
import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl
|
import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl
|
||||||
@@ -80,6 +79,6 @@ class FeedTopNavFilterState(
|
|||||||
.stateIn(
|
.stateIn(
|
||||||
scope,
|
scope,
|
||||||
SharingStarted.Eagerly,
|
SharingStarted.Eagerly,
|
||||||
AuthorsByOutboxTopNavFilter(emptySet()),
|
loadFlowsFor(feedFilterListName.value).startValue(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,5 +26,7 @@ import kotlinx.coroutines.flow.FlowCollector
|
|||||||
interface IFeedFlowsType {
|
interface IFeedFlowsType {
|
||||||
fun flow(): Flow<IFeedTopNavFilter>
|
fun flow(): Flow<IFeedTopNavFilter>
|
||||||
|
|
||||||
|
fun startValue(): IFeedTopNavFilter
|
||||||
|
|
||||||
suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>)
|
suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>)
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -50,7 +50,9 @@ class AllFollowsFeedFlow(
|
|||||||
|
|
||||||
override fun flow() = allFollows.map(::convert)
|
override fun flow() = allFollows.map(::convert)
|
||||||
|
|
||||||
|
override fun startValue(): AllFollowsByOutboxTopNavFilter = convert(allFollows.value)
|
||||||
|
|
||||||
override suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>) {
|
override suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>) {
|
||||||
collector.emit(convert(allFollows.value))
|
collector.emit(startValue())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -49,7 +49,9 @@ class AroundMeFeedFlow(
|
|||||||
|
|
||||||
override fun flow() = location.map(::convert)
|
override fun flow() = location.map(::convert)
|
||||||
|
|
||||||
|
override fun startValue(): LocationTopNavFilter = convert(location.value)
|
||||||
|
|
||||||
override suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>) {
|
override suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>) {
|
||||||
collector.emit(convert(location.value))
|
collector.emit(startValue())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -34,7 +34,9 @@ class GlobalFeedFlow(
|
|||||||
|
|
||||||
override fun flow() = MutableStateFlow(default)
|
override fun flow() = MutableStateFlow(default)
|
||||||
|
|
||||||
|
override fun startValue(): GlobalTopNavFilter = default
|
||||||
|
|
||||||
override suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>) {
|
override suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>) {
|
||||||
collector.emit(default)
|
collector.emit(startValue())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+57
-9
@@ -49,17 +49,51 @@ class NoteFeedFlow(
|
|||||||
val signer: NostrSigner,
|
val signer: NostrSigner,
|
||||||
val allFollowRelays: StateFlow<Set<NormalizedRelayUrl>>,
|
val allFollowRelays: StateFlow<Set<NormalizedRelayUrl>>,
|
||||||
) : IFeedFlowsType {
|
) : IFeedFlowsType {
|
||||||
|
fun process(noteEvent: Event): IFeedTopNavFilter =
|
||||||
|
when (noteEvent) {
|
||||||
|
is PeopleListEvent -> {
|
||||||
|
if (noteEvent.dTag() == PeopleListEvent.Companion.BLOCK_LIST_D_TAG) {
|
||||||
|
MutedAuthorsByOutboxTopNavFilter(noteEvent.publicAndCachedPrivateUsersAndWords().users)
|
||||||
|
} else {
|
||||||
|
AuthorsByOutboxTopNavFilter(noteEvent.publicAndCachedPrivateUsersAndWords().users)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is MuteListEvent -> {
|
||||||
|
MutedAuthorsByOutboxTopNavFilter(noteEvent.publicAndCachedUsersAndWords().users)
|
||||||
|
}
|
||||||
|
is FollowListEvent -> {
|
||||||
|
AuthorsByOutboxTopNavFilter(noteEvent.pubKeys().toSet())
|
||||||
|
}
|
||||||
|
is CommunityListEvent -> {
|
||||||
|
AllCommunitiesTopNavFilter(noteEvent.publicAndCachedPrivateCommunityIds().toSet())
|
||||||
|
}
|
||||||
|
is HashtagListEvent -> {
|
||||||
|
HashtagTopNavFilter(noteEvent.publicAndCachedPrivateHashtags(), allFollowRelays)
|
||||||
|
}
|
||||||
|
is GeohashListEvent -> {
|
||||||
|
LocationTopNavFilter(noteEvent.publicAndCachedPrivateGeohash(), allFollowRelays)
|
||||||
|
}
|
||||||
|
is CommunityDefinitionEvent -> {
|
||||||
|
SingleCommunityTopNavFilter(
|
||||||
|
community = noteEvent.addressTag(),
|
||||||
|
authors = noteEvent.moderatorKeys().toSet().ifEmpty { null },
|
||||||
|
relays = noteEvent.relayUrls().toSet(),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else -> AuthorsByOutboxTopNavFilter(emptySet())
|
||||||
|
}
|
||||||
|
|
||||||
suspend fun FlowCollector<IFeedTopNavFilter>.process(noteEvent: Event) {
|
suspend fun FlowCollector<IFeedTopNavFilter>.process(noteEvent: Event) {
|
||||||
when (noteEvent) {
|
when (noteEvent) {
|
||||||
is PeopleListEvent -> {
|
is PeopleListEvent -> {
|
||||||
if (noteEvent.dTag() == PeopleListEvent.Companion.BLOCK_LIST_D_TAG) {
|
if (noteEvent.dTag() == PeopleListEvent.Companion.BLOCK_LIST_D_TAG) {
|
||||||
emit(MutedAuthorsByOutboxTopNavFilter(noteEvent.publicUsersAndWords().users))
|
emit(MutedAuthorsByOutboxTopNavFilter(noteEvent.publicAndCachedPrivateUsersAndWords().users))
|
||||||
|
|
||||||
noteEvent.publicAndPrivateUsersAndWords(signer)?.let {
|
noteEvent.publicAndPrivateUsersAndWords(signer)?.let {
|
||||||
emit(MutedAuthorsByOutboxTopNavFilter(it.users))
|
emit(MutedAuthorsByOutboxTopNavFilter(it.users))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
emit(AuthorsByOutboxTopNavFilter(noteEvent.publicUsersAndWords().users))
|
emit(AuthorsByOutboxTopNavFilter(noteEvent.publicAndCachedPrivateUsersAndWords().users))
|
||||||
|
|
||||||
noteEvent.publicAndPrivateUsersAndWords(signer)?.let {
|
noteEvent.publicAndPrivateUsersAndWords(signer)?.let {
|
||||||
emit(AuthorsByOutboxTopNavFilter(it.users))
|
emit(AuthorsByOutboxTopNavFilter(it.users))
|
||||||
@@ -67,7 +101,7 @@ class NoteFeedFlow(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
is MuteListEvent -> {
|
is MuteListEvent -> {
|
||||||
emit(MutedAuthorsByOutboxTopNavFilter(noteEvent.publicUsersAndWords().users))
|
emit(MutedAuthorsByOutboxTopNavFilter(noteEvent.publicAndCachedUsersAndWords().users))
|
||||||
|
|
||||||
noteEvent.publicAndPrivateUsersAndWords(signer)?.let {
|
noteEvent.publicAndPrivateUsersAndWords(signer)?.let {
|
||||||
emit(MutedAuthorsByOutboxTopNavFilter(it.users))
|
emit(MutedAuthorsByOutboxTopNavFilter(it.users))
|
||||||
@@ -99,13 +133,18 @@ class NoteFeedFlow(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
is CommunityDefinitionEvent -> {
|
is CommunityDefinitionEvent -> {
|
||||||
SingleCommunityTopNavFilter(
|
emit(
|
||||||
community = noteEvent.addressTag(),
|
SingleCommunityTopNavFilter(
|
||||||
authors = noteEvent.moderatorKeys().toSet().ifEmpty { null },
|
community = noteEvent.addressTag(),
|
||||||
relays = noteEvent.relayUrls().toSet(),
|
authors = noteEvent.moderatorKeys().toSet().ifEmpty { null },
|
||||||
|
relays = noteEvent.relayUrls().toSet(),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
else -> AuthorsByOutboxTopNavFilter(emptySet())
|
else ->
|
||||||
|
emit(
|
||||||
|
AuthorsByOutboxTopNavFilter(emptySet()),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,10 +159,19 @@ class NoteFeedFlow(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun startValue(): IFeedTopNavFilter {
|
||||||
|
val noteEvent = metadataFlow.value?.note?.event
|
||||||
|
if (noteEvent == null) {
|
||||||
|
return AuthorsByOutboxTopNavFilter(emptySet())
|
||||||
|
} else {
|
||||||
|
return process(noteEvent)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>) {
|
override suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>) {
|
||||||
val noteEvent = metadataFlow.value?.note?.event
|
val noteEvent = metadataFlow.value?.note?.event
|
||||||
if (noteEvent == null) {
|
if (noteEvent == null) {
|
||||||
AuthorsByOutboxTopNavFilter(emptySet())
|
collector.emit(AuthorsByOutboxTopNavFilter(emptySet()))
|
||||||
} else {
|
} else {
|
||||||
collector.process(noteEvent)
|
collector.process(noteEvent)
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -30,8 +30,11 @@ class UnknownFeedFlow(
|
|||||||
) : IFeedFlowsType {
|
) : IFeedFlowsType {
|
||||||
override fun flow() = MutableStateFlow(UnknownTopNavFilter(feedName))
|
override fun flow() = MutableStateFlow(UnknownTopNavFilter(feedName))
|
||||||
|
|
||||||
|
// empty feed
|
||||||
|
override fun startValue(): UnknownTopNavFilter = UnknownTopNavFilter(feedName)
|
||||||
|
|
||||||
// empty feed
|
// empty feed
|
||||||
override suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>) {
|
override suspend fun startValue(collector: FlowCollector<IFeedTopNavFilter>) {
|
||||||
collector.emit(UnknownTopNavFilter(feedName))
|
collector.emit(startValue())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ val HomePostsByGeohashKinds =
|
|||||||
fun filterHomePostsByGeohashes(
|
fun filterHomePostsByGeohashes(
|
||||||
relay: NormalizedRelayUrl,
|
relay: NormalizedRelayUrl,
|
||||||
geotags: Set<String>,
|
geotags: Set<String>,
|
||||||
since: Long,
|
since: Long?,
|
||||||
): List<RelayBasedFilter> {
|
): List<RelayBasedFilter> {
|
||||||
if (geotags.isEmpty()) return emptyList()
|
if (geotags.isEmpty()) return emptyList()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ val CommentKinds = listOf(CommentEvent.KIND)
|
|||||||
fun filterHomePostsByScopes(
|
fun filterHomePostsByScopes(
|
||||||
relay: NormalizedRelayUrl,
|
relay: NormalizedRelayUrl,
|
||||||
scopesToLoad: Set<String>,
|
scopesToLoad: Set<String>,
|
||||||
since: Long,
|
since: Long?,
|
||||||
): List<RelayBasedFilter> {
|
): List<RelayBasedFilter> {
|
||||||
if (scopesToLoad.isEmpty()) return emptyList()
|
if (scopesToLoad.isEmpty()) return emptyList()
|
||||||
|
|
||||||
|
|||||||
+8
-12
@@ -27,7 +27,6 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.home.datasource.nip01Core.f
|
|||||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.home.datasource.nip22Comments.filterHomePostsByScopes
|
import com.vitorpamplona.amethyst.ui.screen.loggedIn.home.datasource.nip22Comments.filterHomePostsByScopes
|
||||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.home.datasource.nip72Communities.filterHomePostsFromAllCommunities
|
import com.vitorpamplona.amethyst.ui.screen.loggedIn.home.datasource.nip72Communities.filterHomePostsFromAllCommunities
|
||||||
import com.vitorpamplona.quartz.nip01Core.relay.client.pool.RelayBasedFilter
|
import com.vitorpamplona.quartz.nip01Core.relay.client.pool.RelayBasedFilter
|
||||||
import com.vitorpamplona.quartz.utils.TimeUtils
|
|
||||||
import kotlin.collections.flatten
|
import kotlin.collections.flatten
|
||||||
|
|
||||||
fun filterHomePostsByAllFollows(
|
fun filterHomePostsByAllFollows(
|
||||||
@@ -36,29 +35,26 @@ fun filterHomePostsByAllFollows(
|
|||||||
): List<RelayBasedFilter> {
|
): List<RelayBasedFilter> {
|
||||||
if (followsSet.set.isEmpty()) return emptyList()
|
if (followsSet.set.isEmpty()) return emptyList()
|
||||||
|
|
||||||
val defaultSince = TimeUtils.oneWeekAgo()
|
return followsSet.set.flatMap { (relay, filter) ->
|
||||||
|
val since = since?.get(relay)?.time
|
||||||
return followsSet.set.flatMap {
|
|
||||||
val since = since?.get(it.key)?.time ?: defaultSince
|
|
||||||
val relay = it.key
|
|
||||||
|
|
||||||
listOfNotNull(
|
listOfNotNull(
|
||||||
it.value.authors?.let {
|
filter.authors?.let {
|
||||||
filterHomePostsByAuthors(relay, it, since)
|
filterHomePostsByAuthors(relay, it, since)
|
||||||
},
|
},
|
||||||
it.value.geotags?.let {
|
filter.geotags?.let {
|
||||||
filterHomePostsByGeohashes(relay, it, since)
|
filterHomePostsByGeohashes(relay, it, since)
|
||||||
},
|
},
|
||||||
it.value.geotagScopes?.let {
|
filter.geotagScopes?.let {
|
||||||
filterHomePostsByScopes(relay, it, since)
|
filterHomePostsByScopes(relay, it, since)
|
||||||
},
|
},
|
||||||
it.value.hashtags?.let {
|
filter.hashtags?.let {
|
||||||
filterHomePostsByHashtags(relay, it, since)
|
filterHomePostsByHashtags(relay, it, since)
|
||||||
},
|
},
|
||||||
it.value.hashtagScopes?.let {
|
filter.hashtagScopes?.let {
|
||||||
filterHomePostsByScopes(relay, it, since)
|
filterHomePostsByScopes(relay, it, since)
|
||||||
},
|
},
|
||||||
it.value.communities?.let {
|
filter.communities?.let {
|
||||||
filterHomePostsFromAllCommunities(relay, it, since)
|
filterHomePostsFromAllCommunities(relay, it, since)
|
||||||
},
|
},
|
||||||
).flatten()
|
).flatten()
|
||||||
|
|||||||
+1
-2
@@ -44,7 +44,6 @@ import kotlinx.coroutines.Dispatchers
|
|||||||
import kotlinx.coroutines.FlowPreview
|
import kotlinx.coroutines.FlowPreview
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.collectLatest
|
import kotlinx.coroutines.flow.collectLatest
|
||||||
import kotlinx.coroutines.flow.sample
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
class HomeOutboxEventsEoseManager(
|
class HomeOutboxEventsEoseManager(
|
||||||
@@ -95,7 +94,7 @@ class HomeOutboxEventsEoseManager(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
key.scope.launch(Dispatchers.Default) {
|
key.scope.launch(Dispatchers.Default) {
|
||||||
key.followRelayFlow().sample(2000).collectLatest {
|
key.followRelayFlow().collectLatest {
|
||||||
invalidateFilters()
|
invalidateFilters()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -41,19 +41,19 @@ class MuteListEvent(
|
|||||||
) : GeneralListEvent(id, pubKey, createdAt, KIND, tags, content, sig) {
|
) : GeneralListEvent(id, pubKey, createdAt, KIND, tags, content, sig) {
|
||||||
override fun dTag() = FIXED_D_TAG
|
override fun dTag() = FIXED_D_TAG
|
||||||
|
|
||||||
fun publicUsersAndWords() =
|
fun publicAndCachedUsersAndWords() =
|
||||||
PeopleListEvent.UsersAndWords(
|
UsersAndWords(
|
||||||
filterTagList("p", tags),
|
filterTagList("p", cachedPrivateTags()),
|
||||||
filterTagList("word", tags),
|
filterTagList("word", cachedPrivateTags()),
|
||||||
)
|
)
|
||||||
|
|
||||||
fun publicAndPrivateUsersAndWords(
|
fun publicAndPrivateUsersAndWords(
|
||||||
signer: NostrSigner,
|
signer: NostrSigner,
|
||||||
onReady: (PeopleListEvent.UsersAndWords) -> Unit,
|
onReady: (UsersAndWords) -> Unit,
|
||||||
) {
|
) {
|
||||||
privateTagsOrEmpty(signer) {
|
privateTagsOrEmpty(signer) {
|
||||||
onReady(
|
onReady(
|
||||||
PeopleListEvent.UsersAndWords(
|
UsersAndWords(
|
||||||
filterTagList("p", it),
|
filterTagList("p", it),
|
||||||
filterTagList("word", it),
|
filterTagList("word", it),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ class PeopleListEvent(
|
|||||||
val words: Set<String> = setOf(),
|
val words: Set<String> = setOf(),
|
||||||
)
|
)
|
||||||
|
|
||||||
fun publicUsersAndWords() =
|
fun publicAndCachedPrivateUsersAndWords() =
|
||||||
UsersAndWords(
|
UsersAndWords(
|
||||||
filterTagList("p", tags),
|
filterTagList("p", cachedPrivateTags()),
|
||||||
filterTagList("word", tags),
|
filterTagList("word", cachedPrivateTags()),
|
||||||
)
|
)
|
||||||
|
|
||||||
fun publicAndPrivateUsersAndWords(
|
fun publicAndPrivateUsersAndWords(
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ class HashtagListEvent(
|
|||||||
|
|
||||||
fun publicHashtags() = tags.mapNotNull(HashtagTag::parse)
|
fun publicHashtags() = tags.mapNotNull(HashtagTag::parse)
|
||||||
|
|
||||||
|
fun publicAndCachedPrivateHashtags() = publicHashtags().toSet() + (publicAndPrivateHashtagCache ?: emptySet())
|
||||||
|
|
||||||
fun publicAndPrivateHashtag(
|
fun publicAndPrivateHashtag(
|
||||||
signer: NostrSigner,
|
signer: NostrSigner,
|
||||||
onReady: (Set<String>) -> Unit,
|
onReady: (Set<String>) -> Unit,
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ class GeohashListEvent(
|
|||||||
|
|
||||||
fun publicGeohashes() = tags.mapNotNull(GeoHashTag::parse)
|
fun publicGeohashes() = tags.mapNotNull(GeoHashTag::parse)
|
||||||
|
|
||||||
|
fun publicAndCachedPrivateGeohash() = publicGeohashes().toSet() + (publicAndPrivateGeohashCache ?: emptySet())
|
||||||
|
|
||||||
fun publicAndPrivateGeohash(
|
fun publicAndPrivateGeohash(
|
||||||
signer: NostrSigner,
|
signer: NostrSigner,
|
||||||
onReady: (Set<String>) -> Unit,
|
onReady: (Set<String>) -> Unit,
|
||||||
|
|||||||
+2
@@ -54,6 +54,8 @@ class CommunityListEvent(
|
|||||||
|
|
||||||
fun publicCommunityIds() = tags.mapNotNull(ATag::parseAddressId)
|
fun publicCommunityIds() = tags.mapNotNull(ATag::parseAddressId)
|
||||||
|
|
||||||
|
fun publicAndCachedPrivateCommunityIds() = publicCommunityIds() + (publicAndPrivateAddressCache?.map { it.addressId } ?: emptyList())
|
||||||
|
|
||||||
fun publicAndPrivateCommunities(
|
fun publicAndPrivateCommunities(
|
||||||
signer: NostrSigner,
|
signer: NostrSigner,
|
||||||
onReady: (Set<AddressHint>) -> Unit,
|
onReady: (Set<AddressHint>) -> Unit,
|
||||||
|
|||||||
Reference in New Issue
Block a user