mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-05 21:28:55 +00:00
Cleanup
This commit is contained in:
committed by
Benoit Marty
parent
ff5a3cd86c
commit
b4f7030ec9
-2
@@ -57,7 +57,6 @@ class RoomListPresenter @Inject constructor(
|
|||||||
mutableStateOf(null)
|
mutableStateOf(null)
|
||||||
}
|
}
|
||||||
var filter by rememberSaveable { mutableStateOf("") }
|
var filter by rememberSaveable { mutableStateOf("") }
|
||||||
val isLoginOut = rememberSaveable { mutableStateOf(false) }
|
|
||||||
val roomSummaries by client
|
val roomSummaries by client
|
||||||
.roomSummaryDataSource()
|
.roomSummaryDataSource()
|
||||||
.roomSummaries()
|
.roomSummaries()
|
||||||
@@ -86,7 +85,6 @@ class RoomListPresenter @Inject constructor(
|
|||||||
matrixUser = matrixUser.value,
|
matrixUser = matrixUser.value,
|
||||||
roomList = filteredRoomSummaries.value,
|
roomList = filteredRoomSummaries.value,
|
||||||
filter = filter,
|
filter = filter,
|
||||||
isLoginOut = isLoginOut.value,
|
|
||||||
eventSink = ::handleEvents
|
eventSink = ::handleEvents
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -25,6 +25,5 @@ data class RoomListState(
|
|||||||
val matrixUser: MatrixUser?,
|
val matrixUser: MatrixUser?,
|
||||||
val roomList: ImmutableList<RoomListRoomSummary>,
|
val roomList: ImmutableList<RoomListRoomSummary>,
|
||||||
val filter: String,
|
val filter: String,
|
||||||
val isLoginOut: Boolean,
|
|
||||||
val eventSink: (RoomListEvents) -> Unit
|
val eventSink: (RoomListEvents) -> Unit
|
||||||
)
|
)
|
||||||
|
|||||||
+3
-1
@@ -14,6 +14,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@file:OptIn(ExperimentalCoroutinesApi::class)
|
||||||
|
|
||||||
package io.element.android.features.roomlist
|
package io.element.android.features.roomlist
|
||||||
|
|
||||||
import app.cash.molecule.RecompositionClock
|
import app.cash.molecule.RecompositionClock
|
||||||
@@ -22,6 +24,7 @@ import app.cash.turbine.test
|
|||||||
import com.google.common.truth.Truth.assertThat
|
import com.google.common.truth.Truth.assertThat
|
||||||
import io.element.android.libraries.matrix.core.SessionId
|
import io.element.android.libraries.matrix.core.SessionId
|
||||||
import io.element.android.libraries.matrixtest.FakeMatrixClient
|
import io.element.android.libraries.matrixtest.FakeMatrixClient
|
||||||
|
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||||
import kotlinx.coroutines.test.runTest
|
import kotlinx.coroutines.test.runTest
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
@@ -29,7 +32,6 @@ class RoomListPresenterTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `present - should start with no user and then load user with success`() = runTest {
|
fun `present - should start with no user and then load user with success`() = runTest {
|
||||||
|
|
||||||
val presenter = RoomListPresenter(
|
val presenter = RoomListPresenter(
|
||||||
FakeMatrixClient(
|
FakeMatrixClient(
|
||||||
SessionId("sessionId")
|
SessionId("sessionId")
|
||||||
|
|||||||
Reference in New Issue
Block a user