Code cleanup: DashboardAdapter.category is no longer a list
We only ever display a single DashboardCategory in homepaeg, so the category doesn't need to be a list in DashboardData/Adapter Change-Id: I57db02bb45cbc511f0fce1bf33043b51ef9db15c Fix: 33861822 Test: updated robotests
This commit is contained in:
@@ -292,15 +292,12 @@ public class DashboardSummary extends InstrumentedFragment
|
||||
return;
|
||||
}
|
||||
|
||||
// Temporary hack to wrap homepage category into a list. Soon we will create adapter
|
||||
// API that takes a single category.
|
||||
List<DashboardCategory> categories = new ArrayList<>();
|
||||
categories.add(mDashboardFeatureProvider.getTilesForCategory(
|
||||
CategoryKey.CATEGORY_HOMEPAGE));
|
||||
final DashboardCategory category = mDashboardFeatureProvider.getTilesForCategory(
|
||||
CategoryKey.CATEGORY_HOMEPAGE);
|
||||
if (suggestions != null) {
|
||||
mAdapter.setCategoriesAndSuggestions(categories, suggestions);
|
||||
mAdapter.setCategoriesAndSuggestions(category, suggestions);
|
||||
} else {
|
||||
mAdapter.setCategory(categories);
|
||||
mAdapter.setCategory(category);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user