title: PagingDataAdapter stops loading after fragment is removed and added back
body: <p>I am presenting a <code>PagingSource</code> returned by Room ORM on a PagingDataAdapter.</p>
  <p>The <code>RecyclerView</code> is present on a Fragment -- I have two such fragments. When they are switched, they stop loading the items on next page and only placehodlers are shown on scrolling.</p>
  <p>Please view these screen captures if it isn't clear what I mean--</p>
  <ul>
  <li><a href="https://files.catbox.moe/wmsrrl.mp4" rel="nofollow noreferrer">When I scroll without switching fragments, all the items are loaded</a></li>
  <li><a href="https://files.catbox.moe/arwzps.mp4" rel="nofollow noreferrer">When I switch Fragments before scrolling all the way down, the adapter stops loading new items</a></li>
  </ul>
  <p><strong>Relevant pieces of code (please ask if you would like to see some other part/file) -</strong></p>
  <p>The Fragment:</p>
  <pre class="lang-kotlin prettyprint-override"><code>private lateinit var recyclerView: RecyclerView
  private val recyclerAdapter = CustomersAdapter(this)
  
  override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
      super.onViewCreated(view, savedInstanceState)
  
      recyclerView = view.findViewById(R.id.recycler_view)
      recyclerView.adapter = recyclerAdapter
      recyclerView.layoutManager = LinearLayoutManager(context)
  
      viewLifecycleOwner.lifecycleScope.launch {
          viewModel.customersFlow.collectLatest { pagingData -&gt;
             recyclerAdapter.submitData(pagingData)
          }
      }
  }
  </code></pre>
  <p>View model-</p>
  <pre class="lang-kotlin prettyprint-override"><code>class CustomersListViewModel(application: Application, private val debtOnly: Boolean): ViewModel() {
  
      private val db = AppDatabase.instance(application)
      private val customersDao = db.customersDao()
  
      val customersFlow = Pager(PagingConfig(20)) {
          if (debtOnly)
              customersDao.getAllDebt()
          else
              customersDao.getAll()
      }.flow.cachedIn(viewModelScope)
  }
  </code></pre>