mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 17:35:54 +03:00
Code readability
This commit is contained in:
parent
9c566b19f7
commit
1023982858
1 changed files with 4 additions and 4 deletions
|
@ -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 a new issue