mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
fix: Make Client.findDM return a Result (#4816)
This commit is contained in:
committed by
GitHub
parent
fa2ac28166
commit
07af7cc643
+1
-1
@@ -55,7 +55,7 @@ class UserProfilePresenter @AssistedInject constructor(
|
||||
@Composable
|
||||
private fun getDmRoomId(): State<RoomId?> {
|
||||
return produceState<RoomId?>(initialValue = null) {
|
||||
value = client.findDM(userId)
|
||||
value = client.findDM(userId).getOrNull()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ class UserProfilePresenterTest {
|
||||
if (canFindRoom) {
|
||||
givenGetRoomResult(A_ROOM_ID, room)
|
||||
}
|
||||
givenFindDmResult(dmRoom)
|
||||
givenFindDmResult(Result.success(dmRoom))
|
||||
}
|
||||
val presenter = createUserProfilePresenter(
|
||||
userId = A_USER_ID_2,
|
||||
|
||||
Reference in New Issue
Block a user