Prevent NPE (#3241)

This commit is contained in:
neslihanturan 2019-11-29 17:18:05 +03:00 committed by Josephine Lim
parent cbd5ee1850
commit 3e5360ae4d

View file

@ -84,11 +84,6 @@ public class NearbyFilterSearchRecyclerViewAdapter
selectedLabels.remove(label);
} else {
selectedLabels.add(label);
displayedLabels.remove(label);
displayedLabels.add(selectedLabels.size()-1, label);
notifyDataSetChanged();
smoothScroller.setTargetPosition(0);
recyclerView.getLayoutManager().startSmoothScroll(smoothScroller);
}
label.setSelected(!label.isSelected());
holder.placeTypeLayout.setBackgroundColor(label.isSelected() ? ContextCompat.getColor(context, R.color.divider_grey) : Color.WHITE);