Skip to content

Commit 3e5360a

Browse files
neslihanturanmisaochan
authored andcommitted
Prevent NPE (commons-app#3241)
1 parent cbd5ee1 commit 3e5360a

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

app/src/main/java/fr/free/nrw/commons/nearby/NearbyFilterSearchRecyclerViewAdapter.java

-5
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,6 @@ public void onBindViewHolder(@NonNull RecyclerViewHolder holder, int position) {
8484
selectedLabels.remove(label);
8585
} else {
8686
selectedLabels.add(label);
87-
displayedLabels.remove(label);
88-
displayedLabels.add(selectedLabels.size()-1, label);
89-
notifyDataSetChanged();
90-
smoothScroller.setTargetPosition(0);
91-
recyclerView.getLayoutManager().startSmoothScroll(smoothScroller);
9287
}
9388
label.setSelected(!label.isSelected());
9489
holder.placeTypeLayout.setBackgroundColor(label.isSelected() ? ContextCompat.getColor(context, R.color.divider_grey) : Color.WHITE);

0 commit comments

Comments
 (0)