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

am: 8f54cd46ff

Change-Id: Ib2b362ce72312738201fa2003c2c5a8795c2366d
This commit is contained in:
Doris Ling
2017-08-05 05:32:43 +00:00
committed by android-build-merger
3 changed files with 29 additions and 4 deletions

View File

@@ -232,8 +232,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();
}
}