title: Best practice: Runtime filters with Room and LiveData
body: <p>I am working on a screen that shows the contents of a Room wrapped DB using a recycler. The adapter gets the LiveData from a ViewModel that hides the query call on the Room DAO object. So, the LiveData object is actually a ComputableLiveData object that is aware of changes to the Room DB.</p>
  
  <p>Now I want to add filter options to the screen. Where / how would I implement this in this Room-LiveData-ViewModel setup?</p>
  
  <p>Should the adapter or ViewModel "postfilter" the results in the LiveData? Should I requery the data from room for every filter change? Can I reuse the underlying (Computable)LiveData for that? If not, should I really create new LiveData for every filter change?</p>
  
  <p>A similar question is discussed here: <a href="https://stackoverflow.com/questions/46000120/reload-recyclerview-after-data-change-with-room-viewmodel-and-livedata">Reload RecyclerView after data change with Room, ViewModel and LiveData</a></p>