Fix formatting issues
This commit is contained in:
parent
9250745333
commit
5765a754fc
5 changed files with 6 additions and 12 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue