Separate and kotlinize websockets.

This commit is contained in:
Cody Henthorne
2025-03-05 15:33:15 -05:00
committed by Michelle Tang
parent 6c9acf4657
commit 93d18c1763
26 changed files with 662 additions and 679 deletions

View File

@@ -37,12 +37,12 @@ public final class SignalProxyUtil {
private SignalProxyUtil() {}
public static void startListeningToWebsocket() {
if (SignalStore.proxy().isProxyEnabled() && AppDependencies.getSignalWebSocket().getWebSocketState().firstOrError().blockingGet().isFailure()) {
if (SignalStore.proxy().isProxyEnabled() && AppDependencies.getAuthWebSocket().getState().firstOrError().blockingGet().isFailure()) {
Log.w(TAG, "Proxy is in a failed state. Restarting.");
AppDependencies.resetNetwork();
}
AppDependencies.getIncomingMessageObserver();
AppDependencies.startNetwork();
}
/**
@@ -88,8 +88,8 @@ public final class SignalProxyUtil {
return testWebsocketConnectionUnregistered(timeout);
}
return AppDependencies.getSignalWebSocket()
.getWebSocketState()
return AppDependencies.getAuthWebSocket()
.getState()
.subscribeOn(Schedulers.trampoline())
.observeOn(Schedulers.trampoline())
.timeout(timeout, TimeUnit.MILLISECONDS)