Dismiss suggestion when close button is clicked.
- add handling to the suggestion card to dismiss the suggestion when the close button is clicked. Bug: 70573674 Test: make RunSettingsRoboTests Change-Id: I8155efc326242abde753a633009e2579a9b3aa9b
This commit is contained in:
@@ -151,13 +151,10 @@ public class DashboardAdapterV2 extends RecyclerView.Adapter<DashboardAdapterV2.
|
||||
if (list.size() == 1) {
|
||||
// The only suggestion is dismissed, and the the empty suggestion container will
|
||||
// remain as the dashboard item. Need to refresh the dashboard list.
|
||||
final DashboardDataV2 prevData = mDashboardData;
|
||||
mDashboardData = new DashboardDataV2.Builder(prevData)
|
||||
.setSuggestions(null)
|
||||
.build();
|
||||
notifyDashboardDataChanged(prevData);
|
||||
setSuggestions(null);
|
||||
} else {
|
||||
mSuggestionAdapter.removeSuggestion(suggestion);
|
||||
notifyItemChanged(0, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user