Code readability
This commit is contained in:
parent
9c566b19f7
commit
1023982858
|
@ -101,17 +101,17 @@ class RoomListViewModel @Inject constructor(initialState: RoomListViewState,
|
||||||
.observeOn(Schedulers.computation())
|
.observeOn(Schedulers.computation())
|
||||||
.map { buildRoomSummaries(it) }
|
.map { buildRoomSummaries(it) }
|
||||||
.execute { async ->
|
.execute { async ->
|
||||||
val invitedRooms = async()?.get(RoomCategory.INVITE)?.map { it.roomId } ?: emptyList()
|
val invitedRooms = async()?.get(RoomCategory.INVITE)?.map { it.roomId }.orEmpty()
|
||||||
val remainingJoining = joiningRoomsIds.intersect(invitedRooms)
|
val remainingJoining = joiningRoomsIds.intersect(invitedRooms)
|
||||||
|
val remainingJoinErrors = joiningErrorRoomsIds.intersect(invitedRooms)
|
||||||
val remainingRejecting = rejectingRoomsIds.intersect(invitedRooms)
|
val remainingRejecting = rejectingRoomsIds.intersect(invitedRooms)
|
||||||
val remainingRejectErrors = rejectingErrorRoomsIds.intersect(invitedRooms)
|
val remainingRejectErrors = rejectingErrorRoomsIds.intersect(invitedRooms)
|
||||||
val remainingJoinErrors = joiningErrorRoomsIds.intersect(invitedRooms)
|
|
||||||
copy(
|
copy(
|
||||||
asyncFilteredRooms = async,
|
asyncFilteredRooms = async,
|
||||||
joiningRoomsIds = remainingJoining,
|
joiningRoomsIds = remainingJoining,
|
||||||
|
joiningErrorRoomsIds = remainingJoinErrors,
|
||||||
rejectingRoomsIds = remainingRejecting,
|
rejectingRoomsIds = remainingRejecting,
|
||||||
rejectingErrorRoomsIds = remainingRejectErrors,
|
rejectingErrorRoomsIds = remainingRejectErrors
|
||||||
joiningErrorRoomsIds = remainingJoinErrors
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue