title: RecyclerView RecyclerViewDataObserver was not registered
body: <p>Im working with <code>RecyclerView</code>, <code>SyncAdapter</code> and <a href="https://github.com/greenrobot/EventBus" rel="noreferrer">greenrobot eventbus</a>
  When my <code>SyncAdapter</code> finished syincing i post a message into the message bus:</p>
  
  <pre><code>EventBus.getDefault().post(new EventMessagesRefreshed());
  </code></pre>
  
  <p>In my target class i do the following:</p>
  
  <pre><code>@Subscribe
  public void onEvent(EventMessagesRefreshed event) {
      this.init();
  }
  </code></pre>
  
  <p>And in my <code>init()</code> i create the adapter for the recyclerview and set it:</p>
  
  <pre><code>public void init() {
      if(this.listRowParent != null) {
          this.adapter = new FragmentMessagesListAdapter(this.getActivity(), SingletonMessages.getInstance().getMessages());
          this.listRowParent.setAdapter(this.adapter);
      }
  }
  
  // listRowParent is my RecyclerView!
  </code></pre>
  
  <p>The fragment which receives the event is inside a of a  tab view. So there are multiple tabs and sometimes ofcourse the <code>SyncAdapter</code> posts the <code>EventMessagesRefreshed</code> into the message bus when im not in the correct target tab but since it is registered it tries to call <code>init()</code> and to create the adapter and set it to the <code>RecyclerView</code>. If that happens i get the following error:</p>
  
  <pre><code>Could not dispatch event: class EventMessagesRefreshed to subscribing class class FragmentMessagesList
  java.lang.IllegalStateException: Observer android.support.v7.widget.RecyclerView$RecyclerViewDataObserver@2c3421a7 was not registered.
      at android.database.Observable.unregisterObserver(Observable.java:69)
      at android.support.v7.widget.RecyclerView$Adapter.unregisterAdapterDataObserver(RecyclerView.java:5688)
      at android.support.v7.widget.RecyclerView.setAdapterInternal(RecyclerView.java:873)
      at android.support.v7.widget.RecyclerView.setAdapter(RecyclerView.java:857)
  </code></pre>
  
  <p>So i need to <code>init()</code> my adapter and <code>RecyclerView</code> only when the <code>RecyclerViewDataObserver</code> is registered.</p>
  
  <p><strong>How can i do that?</strong></p>