This commit is contained in:
Benoit Marty 2023-02-06 12:39:36 +01:00 committed by Benoit Marty
parent ff5a3cd86c
commit b4f7030ec9
3 changed files with 3 additions and 4 deletions

View file

@ -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
)
}

View file

@ -25,6 +25,5 @@ data class RoomListState(
val matrixUser: MatrixUser?,
val roomList: ImmutableList<RoomListRoomSummary>,
val filter: String,
val isLoginOut: Boolean,
val eventSink: (RoomListEvents) -> Unit
)

View file

@ -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")