From c0a61378184afcd361e710e5e6dd50cb976138e9 Mon Sep 17 00:00:00 2001 From: 0x330a <92654767+0x330a@users.noreply.github.com> Date: Mon, 6 Mar 2023 17:19:39 +1100 Subject: [PATCH] feat: implement the default user config list --- .../org/thoughtcrime/securesms/dependencies/ConfigFactory.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/dependencies/ConfigFactory.kt b/app/src/main/java/org/thoughtcrime/securesms/dependencies/ConfigFactory.kt index ec31c25bd7..fe74683d5d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/dependencies/ConfigFactory.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/dependencies/ConfigFactory.kt @@ -11,7 +11,6 @@ import org.session.libsession.utilities.ConfigFactoryUpdateListener import org.session.libsignal.protos.SignalServiceProtos.SharedConfigMessage import org.thoughtcrime.securesms.database.ConfigDatabase import org.thoughtcrime.securesms.util.ConfigurationMessageUtilities -import java.util.concurrent.ConcurrentSkipListSet class ConfigFactory(private val context: Context, private val configDatabase: ConfigDatabase, @@ -29,10 +28,8 @@ class ConfigFactory(private val context: Context, private val userLock = Object() private var _userConfig: UserProfile? = null - private val userHashes = ConcurrentSkipListSet() private val contactsLock = Object() private var _contacts: Contacts? = null - private val contactsHashes = ConcurrentSkipListSet() private val convoVolatileLock = Object() private var _convoVolatileConfig: ConversationVolatileConfig? = null private val userGroupsLock = Object() @@ -102,6 +99,8 @@ class ConfigFactory(private val context: Context, _userGroups } + override fun getUserConfigs(): List = listOfNotNull(user, contacts, convoVolatile, userGroups) + private fun persistUserConfigDump() = synchronized(userLock) { val dumped = user?.dump() ?: return