title: Android Paging 3 library - for paging data from Room database, flow becomes empty on data change
body: <p>I am trying to use android Paging 3 (version 3.0.0-SNAPSHOT) for paging data from Room database(no remote data source).</p>
  <p>Initially the page loads data successfully , but when  a new &quot;Entry&quot; is added to database and I return to this page,collectLatest is fired but no data is loaded (&quot;pagingData&quot; entry list is empty )</p>
  <p>this is my query :</p>
  <pre><code>   @Query(&quot;SELECT * FROM entry ORDER BY dateTime DESC&quot;)
    fun getAll() : PagingSource&lt;Int, Entry&gt;
  </code></pre>
  <p>and this is my viewmodel:</p>
  <pre><code> val flow = Pager(
      PagingConfig(pageSize = 20)
  ) {
      entryDao.getAll()
  }.flow
     .cachedIn(viewModelScope)
  </code></pre>
  <p>in my fragment , I am observing the data like this :</p>
  <pre><code>iewLifecycleOwner.lifecycleScope.launch {
          homeViewModel.flow.collectLatest { pagingData -&gt;
              adapter.submitData(pagingData)
          }
      }
  </code></pre>
  <p>and this is my adapter:</p>
  <pre><code>class EntriesAdapter( val context : Context, private val onClick: (String)-&gt;Unit) :
      PagingDataAdapter&lt;Entry , RecyclerView.ViewHolder&gt;(diffCallback)
  {
      override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): EntryViewHolder
              = EntryViewHolder(
       DataBindingUtil.inflate(
              LayoutInflater.from(parent.context),
              R.layout.item_entry, parent, false
          ) , onClick)
  
      override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
          var entry = getItem(position)
          if (entry != null) {
              (holder as EntryViewHolder).bindTo(entry);
          }
      }
  
      companion object {
          //This diff callback informs the PagedListAdapter how to compute list differences when new
          private val diffCallback = object : DiffUtil.ItemCallback&lt;Entry&gt;() {
              override fun areItemsTheSame(oldItem: Entry, newItem: Entry): Boolean =
                  oldItem.id == newItem.id
  
              override fun areContentsTheSame(oldItem: Entry, newItem: Entry): Boolean =
                  oldItem.id == newItem.id
          }
      }
      inner class EntryViewHolder( val binding : ItemEntryBinding ,val onCLick:
          (String)-&gt;Unit ) : RecyclerView.ViewHolder(binding.root) {
          var entry:Entry? = null
          fun bindTo(entry: Entry) {
              this.entry = entry
              with(binding) {
                  entryItem = entry
                  cardView.setOnClickListener{
                      onCLick
                  }
                
                  executePendingBindings()
              }
          }
      }
  }
  </code></pre>