Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bb2fb2ff authored by Shen Lin's avatar Shen Lin
Browse files

Ensure search highlight position when scheduled runnable starts

Search highlight function includes two steps: Scroll list to target position first, then notifyItemChanged to it.

We use a Handler.postDelay to implement this. However, when scheduled runnable starts, the original target position could have changed due to preference list update, calling recyclerview's methods after that will be easy to cause an exception.

This CL ensures highlight position every time before calling recyclerView update, which also contribute to origin fix of RecyclerView IllegalArgumentException to a certain extent.

Test: atest, also test some search results, and see the correct behavior
Fixes: 246411107

Change-Id: Ifa758ce3718b047138079246cdfce99fdf66d5b2
parent bdcd3a39
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment