Fix some coding style issues

This commit is contained in:
Maxime NATUREL 2022-09-06 16:43:38 +02:00
parent 88a5c42a4a
commit c65bbd91d9
5 changed files with 3 additions and 8 deletions

View file

@ -151,4 +151,3 @@ class DevicesViewModel @AssistedInject constructor(
// TODO implement when needed // TODO implement when needed
} }
} }

View file

@ -17,7 +17,6 @@
package im.vector.app.features.settings.devices.v2 package im.vector.app.features.settings.devices.v2
import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.core.di.ActiveSessionHolder
import im.vector.app.features.settings.devices.v2.CurrentSessionCrossSigningInfo
import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.flow.emptyFlow
import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.map

View file

@ -16,7 +16,6 @@
package im.vector.app.features.settings.devices.v2 package im.vector.app.features.settings.devices.v2
import im.vector.app.features.settings.devices.v2.CurrentSessionCrossSigningInfo
import org.matrix.android.sdk.api.session.crypto.model.CryptoDeviceInfo import org.matrix.android.sdk.api.session.crypto.model.CryptoDeviceInfo
import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel
import javax.inject.Inject import javax.inject.Inject

View file

@ -121,10 +121,8 @@ class DevicesViewModelTest {
// Then // Then
viewModelTest.assertLatestState { viewModelTest.assertLatestState {
it.devices is Success it.devices is Success && it.devices.invoke() == deviceFullInfoList &&
&& it.devices.invoke() == deviceFullInfoList it.inactiveSessionsCount == 1 && it.unverifiedSessionsCount == 1
&& it.inactiveSessionsCount == 1
&& it.unverifiedSessionsCount == 1
} }
viewModelTest.finish() viewModelTest.finish()
} }

View file

@ -66,7 +66,7 @@ class GetDeviceFullInfoListUseCaseTest {
} }
@Test @Test
fun `given active session when getting list of device full info then the result list is correct and sorted in descending order`() = runTest(testDispatcher) { fun `given active session when getting list of device full info then the list is correct and sorted in descending order`() = runTest(testDispatcher) {
// Given // Given
val currentSessionCrossSigningInfo = givenCurrentSessionCrossSigningInfo() val currentSessionCrossSigningInfo = givenCurrentSessionCrossSigningInfo()
val fakeFlowSession = fakeActiveSessionHolder.fakeSession.givenFlowSession() val fakeFlowSession = fakeActiveSessionHolder.fakeSession.givenFlowSession()