|
@@ -176,7 +176,11 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
|
|
val nursingConfigs = bedVO.nurseConfigDtos
|
|
val nursingConfigs = bedVO.nurseConfigDtos
|
|
if (nursingConfigs != null && nursingConfigs.size > 0) {
|
|
if (nursingConfigs != null && nursingConfigs.size > 0) {
|
|
for ((index, e) in nursingConfigs.withIndex()) {
|
|
for ((index, e) in nursingConfigs.withIndex()) {
|
|
- configList.set(index, e)
|
|
|
|
|
|
+ if (index < configList.size) {
|
|
|
|
+ configList.set(index, e)
|
|
|
|
+ } else {
|
|
|
|
+ configList.add(e)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -265,7 +269,11 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
|
|
val nursingConfigs = bedVO.nurseConfigDtos
|
|
val nursingConfigs = bedVO.nurseConfigDtos
|
|
if (nursingConfigs != null && nursingConfigs.size > 0) {
|
|
if (nursingConfigs != null && nursingConfigs.size > 0) {
|
|
for ((index, e) in nursingConfigs.withIndex()) {
|
|
for ((index, e) in nursingConfigs.withIndex()) {
|
|
- configList.set(index, e)
|
|
|
|
|
|
+ if (index < configList.size) {
|
|
|
|
+ configList.set(index, e)
|
|
|
|
+ } else {
|
|
|
|
+ configList.add(e)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|