mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 18:26:35 +02:00
Small optimization
This commit is contained in:
@@ -131,9 +131,9 @@ class FollowListOutboxOrProxyRelays(
|
|||||||
val flowSet: StateFlow<Set<String>> =
|
val flowSet: StateFlow<Set<String>> =
|
||||||
flow
|
flow
|
||||||
.map { relayList ->
|
.map { relayList ->
|
||||||
relayList.map { it.url }.toSet()
|
relayList.mapTo(mutableSetOf()) { it.url }
|
||||||
}.onStart {
|
}.onStart {
|
||||||
emit(flow.value.map { it.url }.toSet())
|
emit(flow.value.mapTo(mutableSetOf()) { it.url })
|
||||||
}.flowOn(Dispatchers.Default)
|
}.flowOn(Dispatchers.Default)
|
||||||
.stateIn(
|
.stateIn(
|
||||||
scope,
|
scope,
|
||||||
|
Reference in New Issue
Block a user