Skip to content

Commit 0a8d470

Browse files
FlyingpigNZgoofyz
authored andcommitted
fix: crashes when trying to insert using liquid keyboard candidate.
This can also fix the problem that invisible TextView objects' widthes are not updated after updating candidates.
1 parent 5776370 commit 0a8d470

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/com/osfans/trime/ime/symbol/CandidateAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class CandidateAdapter(theme: Theme) : RecyclerView.Adapter<CandidateAdapter.Vie
4040
fun updateCandidates(candidates: List<CandidateListItem>) {
4141
mCandidates.clear()
4242
mCandidates.addAll(candidates)
43-
notifyDataSetChanged()
43+
notifyItemRangeChanged(0, candidates.size)
4444
}
4545

4646
override fun getItemCount(): Int {

0 commit comments

Comments
 (0)