remove doubled notifyDatasetChanged

This commit is contained in:
Milos Kozak 2019-09-04 22:11:45 +02:00
parent 139455747e
commit 07fd0654ca

View file

@ -84,14 +84,13 @@ class EventListAdapter extends RecyclerView.Adapter<EventListAdapter.ViewHolder>
// enabled event // enabled event
holder.enabled.setOnCheckedChangeListener((buttonView, isChecked) -> { holder.enabled.setOnCheckedChangeListener((buttonView, isChecked) -> {
event.setEnabled(isChecked); event.setEnabled(isChecked);
notifyDataSetChanged();
RxBus.INSTANCE.send(new EventAutomationDataChanged()); RxBus.INSTANCE.send(new EventAutomationDataChanged());
}); });
// remove event // remove event
holder.iconTrash.setOnClickListener(v -> { holder.iconTrash.setOnClickListener(v -> {
mEventList.remove(event); mEventList.remove(event);
notifyDataSetChanged(); RxBus.INSTANCE.send(new EventAutomationDataChanged());
}); });
// edit event // edit event