[2.14.0]录包工具修复Bug

This commit is contained in:
xuxinchao
2023-02-15 01:13:53 +08:00
parent 689ea85737
commit dc318d1732

View File

@@ -60,31 +60,36 @@ class BagManagerListAdapter: RecyclerView.Adapter<RecyclerView.ViewHolder>() {
bagClickListener?.onClick(bagInfoEntity,isChecked)
}
holder.etBagNameEdit.addTextChangedListener(object:TextWatcher{
val textWatcher: TextWatcher = object : TextWatcher {
override fun beforeTextChanged(
s: CharSequence?,
start: Int,
count: Int,
after: Int
charSequence: CharSequence,
i: Int,
i1: Int,
i2: Int
) {
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
}
override fun afterTextChanged(s: Editable?) {
override fun onTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {}
override fun afterTextChanged(editable: Editable) {
bagInfoEntity.description?.let { desc->
val descriptionStr = s.toString()
val descriptionStr = editable.toString()
if(desc.description != descriptionStr){
desc.description = descriptionStr
bagClickListener?.editDescription(bagInfoEntity.key,desc)
}
}
}
}
holder.etBagNameEdit.onFocusChangeListener =
View.OnFocusChangeListener { p0, hasFocus ->
val edit = p0 as EditText
if(hasFocus){
edit.addTextChangedListener(textWatcher)
}else{
edit.removeTextChangedListener(textWatcher)
}
}
})
bagInfoEntity.description?.let { des->
if(des.reportBI){