Merge "Fix crash when dismissing suggestions." into oc-dr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8f54cd46ff
@@ -232,8 +232,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
|
||||
.build();
|
||||
notifyDashboardDataChanged(prevData);
|
||||
} else {
|
||||
suggestions.remove(suggestion);
|
||||
mSuggestionAdapter.notifyDataSetChanged();
|
||||
mSuggestionAdapter.removeSuggestion(suggestion);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -134,4 +134,8 @@ public class SuggestionAdapter extends RecyclerView.Adapter<DashboardItemHolder>
|
||||
return null;
|
||||
}
|
||||
|
||||
public void removeSuggestion(Tile suggestion) {
|
||||
mSuggestions.remove(suggestion);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user