mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-20 20:48:57 +00:00
feat: adding config sync functionality, refactoring jobs to execute in suspend context to do some nice coroutine execution
This commit is contained in:
@@ -126,6 +126,8 @@ class ConfigFactory(private val context: Context,
|
||||
}
|
||||
|
||||
override fun notifyUpdates(forConfigObject: ConfigBase) {
|
||||
if (!forConfigObject.needsDump()) return
|
||||
|
||||
when (forConfigObject) {
|
||||
is UserProfile -> updateUser(forConfigObject)
|
||||
is Contacts -> updateContacts(forConfigObject)
|
||||
|
@@ -6,10 +6,10 @@ import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import org.session.libsession.database.StorageProtocol
|
||||
import org.session.libsession.utilities.TextSecurePreferences
|
||||
import org.thoughtcrime.securesms.crypto.KeyPairUtilities
|
||||
import org.thoughtcrime.securesms.database.ConfigDatabase
|
||||
import org.thoughtcrime.securesms.database.Storage
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@@ -23,7 +23,7 @@ object SessionUtilModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideConfigFactory(@ApplicationContext context: Context, configDatabase: ConfigDatabase, storage: StorageProtocol): ConfigFactory =
|
||||
fun provideConfigFactory(@ApplicationContext context: Context, configDatabase: ConfigDatabase, storage: Storage): ConfigFactory =
|
||||
ConfigFactory(context, configDatabase, storage) {
|
||||
val localUserPublicKey = TextSecurePreferences.getLocalNumber(context)
|
||||
val secretKey = maybeUserEdSecretKey(context)
|
||||
|
Reference in New Issue
Block a user