Fix ArrayIndexOutOfBoundsException (#3808)

Fixes https://github.com/tuskyapp/Tusky/issues/3807
This commit is contained in:
Nik Clayton 2023-07-06 19:57:35 +02:00 committed by GitHub
parent 121db1713d
commit 3c90f22b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -82,11 +82,11 @@ class AccountFieldEditAdapter : RecyclerView.Adapter<BindingHolder<ItemEditField
}
holder.binding.accountFieldNameText.doAfterTextChanged { newText ->
fieldData[holder.bindingAdapterPosition].first = newText.toString()
fieldData.getOrNull(holder.bindingAdapterPosition)?.first = newText.toString()
}
holder.binding.accountFieldValueText.doAfterTextChanged { newText ->
fieldData[holder.bindingAdapterPosition].second = newText.toString()
fieldData.getOrNull(holder.bindingAdapterPosition)?.second = newText.toString()
}
// Ensure the textview contents are selectable