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

Skip to content
Commit 335fdf31 authored by Shamali P's avatar Shamali P Committed by Shamali Patwa
Browse files

Fix issue that old search results list show up momentarily

After exiting the search, we clear the search results and hide the
results lists (because that recycler view shouldn't be accessible after it). However, it often doesn't get chance to layout the empty data.
So, the next time we show the search results list again with new data,
it first animates to clear the old results and then animates in the new
ones. In this fix,
[demo](http://screencast/cast/NDg5OTg2NzIyMTU1NzI0OHxhMTk0NzEzZS1hYw), we swap the adapter to remove any old views, because old search results aren't valid anymore. Spoke with yigit who worked on RV in past and they suggested swapAdapter
was fine for this.

Other options explored:
1. set item animator = null; so, it doesn't animate flushing out old
results -> but we want animations
2. delay the visibility update to let layout happen -> but, if we are
 hiding the section,  why wait making the other UI updates until
layout?

Bug: 274051332
Flag: N/A
Test: Manual
Change-Id: I9f9c5a67b47b5415b2d9e4caa23fd4b6daf7cdea
(cherry picked from commit 809e1a8e)
parent ca79c708
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment