[6.8.0]fix IndexOutOfBoundsException
This commit is contained in:
@@ -45,11 +45,13 @@ class TakeOverListAdapter(private val context: Context): RecyclerView.Adapter<Ta
|
||||
* 修改元素
|
||||
*/
|
||||
fun notifyRecordItemChanged(info: TakeOverRecordInfo){
|
||||
val pos = data?.indexOf(info)
|
||||
pos?.let {
|
||||
data?.set(pos, info)
|
||||
notifyItemChanged(pos)
|
||||
}
|
||||
try {
|
||||
val pos = data?.indexOf(info)
|
||||
pos?.let {
|
||||
data?.set(pos, info)
|
||||
notifyItemChanged(pos)
|
||||
}
|
||||
}catch (_:Exception){}
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TakeOverRecordHolder {
|
||||
|
||||
Reference in New Issue
Block a user