Merge "Fix crash when dismissing suggestions." into oc-mr1-dev

am: e923d649c0

Change-Id: Id3f46f1a8a3751f82368c5effdba92db25b77199
This commit is contained in:
Doris Ling
2017-08-04 20:14:27 +00:00
committed by android-build-merger
3 changed files with 29 additions and 2 deletions

View File

@@ -211,8 +211,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
.build();
notifyDashboardDataChanged(prevData);
} else {
suggestions.remove(suggestion);
mSuggestionAdapter.notifyDataSetChanged();
mSuggestionAdapter.removeSuggestion(suggestion);
}
}

View File

@@ -134,4 +134,8 @@ public class SuggestionAdapter extends RecyclerView.Adapter<DashboardItemHolder>
return null;
}
public void removeSuggestion(Tile suggestion) {
mSuggestions.remove(suggestion);
notifyDataSetChanged();
}
}