mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 11:05:25 +00:00
Config uploader
This commit is contained in:
parent
80344f0ffd
commit
d2a4f12c29
@ -41,7 +41,7 @@ import com.squareup.phrase.Phrase;
|
||||
import org.conscrypt.Conscrypt;
|
||||
import org.session.libsession.database.MessageDataProvider;
|
||||
import org.session.libsession.messaging.MessagingModuleConfiguration;
|
||||
import org.session.libsession.messaging.configs.ConfigSyncHandler;
|
||||
import org.session.libsession.messaging.configs.ConfigUploader;
|
||||
import org.session.libsession.messaging.groups.GroupManagerV2;
|
||||
import org.session.libsession.messaging.groups.RemoveGroupMemberHandler;
|
||||
import org.session.libsession.messaging.notifications.TokenFetcher;
|
||||
@ -50,7 +50,6 @@ import org.session.libsession.messaging.sending_receiving.pollers.LegacyClosedGr
|
||||
import org.session.libsession.messaging.sending_receiving.pollers.Poller;
|
||||
import org.session.libsession.snode.SnodeClock;
|
||||
import org.session.libsession.snode.SnodeModule;
|
||||
import org.session.libsession.utilities.Address;
|
||||
import org.session.libsession.utilities.Device;
|
||||
import org.session.libsession.utilities.Environment;
|
||||
import org.session.libsession.utilities.ProfilePictureUtilities;
|
||||
@ -161,7 +160,8 @@ public class ApplicationContext extends Application implements DefaultLifecycleO
|
||||
@Inject SSKEnvironment.ProfileManagerProtocol profileManager;
|
||||
CallMessageProcessor callMessageProcessor;
|
||||
MessagingModuleConfiguration messagingModuleConfiguration;
|
||||
@Inject ConfigSyncHandler configSyncHandler;
|
||||
@Inject
|
||||
ConfigUploader configUploader;
|
||||
@Inject RemoveGroupMemberHandler removeGroupMemberHandler;
|
||||
@Inject SnodeClock snodeClock;
|
||||
|
||||
@ -268,7 +268,7 @@ public class ApplicationContext extends Application implements DefaultLifecycleO
|
||||
HTTP.INSTANCE.setConnectedToNetwork(networkConstraint::isMet);
|
||||
|
||||
pushRegistrationHandler.run();
|
||||
configSyncHandler.start();
|
||||
configUploader.start();
|
||||
removeGroupMemberHandler.start();
|
||||
snodeClock.start();
|
||||
|
||||
|
@ -1,16 +1,11 @@
|
||||
package org.session.libsession.messaging.configs
|
||||
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.asCoroutineDispatcher
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.awaitAll
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import kotlinx.coroutines.flow.debounce
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.sync.Mutex
|
||||
import kotlinx.coroutines.sync.withLock
|
||||
@ -34,17 +29,16 @@ import org.session.libsignal.utilities.Log
|
||||
import org.session.libsignal.utilities.Namespace
|
||||
import org.session.libsignal.utilities.Snode
|
||||
import org.session.libsignal.utilities.retryWithUniformInterval
|
||||
import java.util.concurrent.Executors
|
||||
import javax.inject.Inject
|
||||
|
||||
private const val TAG = "ConfigSyncHandler"
|
||||
private const val TAG = "ConfigUploader"
|
||||
|
||||
/**
|
||||
* This class is responsible for sending the local config changes to the swarm.
|
||||
*
|
||||
* It does so by listening for changes in the config factory.
|
||||
*/
|
||||
class ConfigSyncHandler @Inject constructor(
|
||||
class ConfigUploader @Inject constructor(
|
||||
private val configFactory: ConfigFactoryProtocol,
|
||||
private val storageProtocol: StorageProtocol,
|
||||
) {
|
Loading…
Reference in New Issue
Block a user