Make MatrixClient return a RoomPreview instance, not a RoomPreviewInfo one.
This commit is contained in:
parent
e8dd8a1a87
commit
fa5ee41867
11 changed files with 101 additions and 58 deletions
|
|
@ -104,10 +104,12 @@ class JoinRoomPresenter @AssistedInject constructor(
|
|||
}
|
||||
else -> {
|
||||
value = ContentState.Loading
|
||||
val result = matrixClient.getRoomPreviewInfo(roomIdOrAlias, serverNames)
|
||||
val result = matrixClient.getRoomPreview(roomIdOrAlias, serverNames)
|
||||
value = result.fold(
|
||||
onSuccess = { previewInfo ->
|
||||
previewInfo.toContentState()
|
||||
onSuccess = { preview ->
|
||||
preview.info.toContentState()
|
||||
},
|
||||
onFailure = { throwable ->
|
||||
if (throwable is ClientException.MatrixApi && (throwable.kind == ErrorKind.NotFound || throwable.kind == ErrorKind.Forbidden)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue