Fix formatting issues
This commit is contained in:
@@ -38,7 +38,6 @@ class SendQueues @Inject constructor(
|
||||
private val matrixClient: MatrixClient,
|
||||
private val networkMonitor: NetworkMonitor,
|
||||
) {
|
||||
|
||||
fun launchIn(coroutineScope: CoroutineScope) {
|
||||
networkMonitor.connectivity
|
||||
.onEach { networkStatus ->
|
||||
@@ -55,6 +54,7 @@ class SendQueues @Inject constructor(
|
||||
room.setSendQueueEnabled(enabled = true)
|
||||
}
|
||||
}
|
||||
}.launchIn(coroutineScope)
|
||||
}
|
||||
.launchIn(coroutineScope)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ import org.junit.Test
|
||||
|
||||
@Test
|
||||
fun `test network status online and sending queue failed`() = runTest {
|
||||
|
||||
val sendQueueDisabledFlow = MutableSharedFlow<RoomId>(replay = 1)
|
||||
val setAllSendQueuesEnabledLambda = lambdaRecorder { _: Boolean -> }
|
||||
matrixClient.sendQueueDisabledFlow = sendQueueDisabledFlow
|
||||
@@ -62,12 +61,10 @@ import org.junit.Test
|
||||
assert(setRoomSendQueueEnabledLambda)
|
||||
.isCalledOnce()
|
||||
.with(value(true))
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test network status offline and sending queue failed`() = runTest {
|
||||
|
||||
val sendQueueDisabledFlow = MutableSharedFlow<RoomId>(replay = 1)
|
||||
|
||||
val setAllSendQueuesEnabledLambda = lambdaRecorder { _: Boolean -> }
|
||||
@@ -91,12 +88,10 @@ import org.junit.Test
|
||||
|
||||
assert(setRoomSendQueueEnabledLambda)
|
||||
.isNeverCalled()
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test network status getting offline and online`() = runTest {
|
||||
|
||||
val setEnableSendingQueueLambda = lambdaRecorder { _: Boolean -> }
|
||||
matrixClient.setAllSendQueuesEnabledLambda = setEnableSendingQueueLambda
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.matrix.rustcomponents.sdk.OidcConfiguration
|
||||
import java.io.File
|
||||
import javax.inject.Inject
|
||||
|
||||
class OidConfigurationProvider @Inject constructor(
|
||||
class OidcConfigurationProvider @Inject constructor(
|
||||
private val baseDirectory: File,
|
||||
) {
|
||||
fun get(): OidcConfiguration = OidcConfiguration(
|
||||
@@ -69,7 +69,7 @@ class RustMatrixAuthenticationService @Inject constructor(
|
||||
private val passphraseGenerator: PassphraseGenerator,
|
||||
userCertificatesProvider: UserCertificatesProvider,
|
||||
proxyProvider: ProxyProvider,
|
||||
private val oidConfigurationProvider: OidConfigurationProvider,
|
||||
private val oidcConfigurationProvider: OidcConfigurationProvider,
|
||||
) : MatrixAuthenticationService {
|
||||
// Passphrase which will be used for new sessions. Existing sessions will use the passphrase
|
||||
// stored in the SessionData.
|
||||
@@ -81,7 +81,7 @@ class RustMatrixAuthenticationService @Inject constructor(
|
||||
proxy = proxyProvider.provides(),
|
||||
userAgent = userAgentProvider.provide(),
|
||||
additionalRootCertificates = userCertificatesProvider.provides(),
|
||||
oidcConfiguration = oidConfigurationProvider.get(),
|
||||
oidcConfiguration = oidcConfigurationProvider.get(),
|
||||
customSlidingSyncProxy = null,
|
||||
sessionDelegate = null,
|
||||
crossProcessRefreshLockId = null,
|
||||
@@ -220,7 +220,7 @@ class RustMatrixAuthenticationService @Inject constructor(
|
||||
.passphrase(pendingPassphrase)
|
||||
.buildWithQrCode(
|
||||
qrCodeData = (qrCodeData as SdkQrCodeLoginData).rustQrCodeData,
|
||||
oidcConfiguration = oidConfigurationProvider.get(),
|
||||
oidcConfiguration = oidcConfigurationProvider.get(),
|
||||
progressListener = object : QrLoginProgressListener {
|
||||
override fun onUpdate(state: QrLoginProgress) {
|
||||
Timber.d("QR Code login progress: $state")
|
||||
|
||||
@@ -281,7 +281,6 @@ class RustTimeline(
|
||||
messageEventContentFromParts(body, htmlBody).withMentions(mentions.map()).use { content ->
|
||||
runCatching<Unit> {
|
||||
inner.send(content)
|
||||
Unit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user