Don't listen for the same broadcast events twice.

Caused crashes when we incorrectly provided info to the recyler view
about which items had been added/removed.
This commit is contained in:
Peter Serwylo 2017-03-22 13:00:51 +11:00
parent d4584083af
commit ba503812e4

View File

@ -69,7 +69,8 @@ class MainViewAdapter extends RecyclerView.Adapter<MainViewController> {
holder.bindSwapView();
break;
case R.id.updates:
holder.bindUpdates();
// Hold of until onViewAttachedToWindow, because that is where we want to start listening
// for broadcast events (which is what the data binding does).
break;
case R.id.settings:
holder.bindSettingsView();