From 4b959577f0981af3716fbcc38211baf5b7feccb4 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 3 Oct 2025 16:37:20 -0400 Subject: [PATCH] Corrects follow list logs for performance and uses the right scope --- .../amethyst/model/nip02FollowLists/FollowListState.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip02FollowLists/FollowListState.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip02FollowLists/FollowListState.kt index a5429d656e..7bf5816de0 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip02FollowLists/FollowListState.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip02FollowLists/FollowListState.kt @@ -36,7 +36,6 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi -import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow @@ -160,10 +159,10 @@ class FollowListState( init { settings.backupContactList?.let { - Log.d("AccountRegisterObservers", "Loading saved contacts ${it.toJson()}") + Log.d("AccountRegisterObservers", "Loading saved ${it.tags.size} contacts") @OptIn(DelicateCoroutinesApi::class) - GlobalScope.launch(Dispatchers.IO) { LocalCache.justConsumeMyOwnEvent(it) } + scope.launch(Dispatchers.IO) { LocalCache.justConsumeMyOwnEvent(it) } } // saves contact list for the next time.