From 08897522390f771ee6c8d003091cf87e9588914b Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 6 Feb 2023 12:39:36 +0100 Subject: [PATCH] Cleanup --- .../io/element/android/features/roomlist/RoomListPresenter.kt | 2 -- .../element/android/features/roomlist/model/RoomListState.kt | 1 - .../android/features/roomlist/RoomListPresenterTests.kt | 4 +++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListPresenter.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListPresenter.kt index b28504eee1..c684b0dd45 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListPresenter.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListPresenter.kt @@ -57,7 +57,6 @@ class RoomListPresenter @Inject constructor( mutableStateOf(null) } var filter by rememberSaveable { mutableStateOf("") } - val isLoginOut = rememberSaveable { mutableStateOf(false) } val roomSummaries by client .roomSummaryDataSource() .roomSummaries() @@ -86,7 +85,6 @@ class RoomListPresenter @Inject constructor( matrixUser = matrixUser.value, roomList = filteredRoomSummaries.value, filter = filter, - isLoginOut = isLoginOut.value, eventSink = ::handleEvents ) } diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListState.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListState.kt index f2d873654b..e9a48a7249 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListState.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListState.kt @@ -25,6 +25,5 @@ data class RoomListState( val matrixUser: MatrixUser?, val roomList: ImmutableList, val filter: String, - val isLoginOut: Boolean, val eventSink: (RoomListEvents) -> Unit ) diff --git a/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt b/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt index 615353b7e8..1f2d265cc8 100644 --- a/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt +++ b/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt @@ -14,6 +14,8 @@ * limitations under the License. */ +@file:OptIn(ExperimentalCoroutinesApi::class) + package io.element.android.features.roomlist import app.cash.molecule.RecompositionClock @@ -22,6 +24,7 @@ import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.libraries.matrix.core.SessionId import io.element.android.libraries.matrixtest.FakeMatrixClient +import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import org.junit.Test @@ -29,7 +32,6 @@ class RoomListPresenterTests { @Test fun `present - should start with no user and then load user with success`() = runTest { - val presenter = RoomListPresenter( FakeMatrixClient( SessionId("sessionId")