Hack to wait for both suggestion/category to load

- This is unfortunately necessary to avoid a jank when category
  load completes before suggestion load, in which case user has to
  manually scroll up to see the suggestions.
- We could technically just add scrollTo(0), but that causes the list
  scroll on its own within 0.5 second of settings start, and that's bad.

Change-Id: I8dc869a69a5bf11bbf7644b281cc1778dd1a90e8
Fixes: 69068691
Test: visual
Test: robotests
This commit is contained in:
Fan Zhang
2017-12-04 14:31:30 -08:00
parent d786fc5bdd
commit cbc97bc7dd
4 changed files with 47 additions and 9 deletions

View File

@@ -161,7 +161,6 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
}
public void setSuggestionsV2(List<Suggestion> data) {
// TODO: Tint icon
final DashboardData prevData = mDashboardData;
mDashboardData = new DashboardData.Builder(prevData)
.setSuggestionsV2(data)