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