title: SharedFlow won't emit value to subscriber at fragment (collect)
body: <p>I want to use <code>SharedFlow</code> instead of <code>StateFlow</code> because first one doesn't require initial value</p>
  <p><strong>ViewModel</strong>:</p>
  <pre><code>val photosPaginData = photoRepository.getPhotosPagingData() // Flow&lt;PagingData&lt;Photo&gt;&gt;
      .cachedIn(viewModelScope)
      .shareIn(viewModelScope, SharingStarted.Eagerly)
  </code></pre>
  <p><strong>Fragment</strong>:</p>
  <pre><code>viewLifecycleOwner.lifecycleScope.launchWhenStarted {
      viewModel.photosPaginData.collect { pagingData -&gt;
          photosAdapter.submitData(pagingData) // no calls here...
      }
  }
  </code></pre>
  <p>I'm only trying to use it for the first time so mb I don't fully understand how it works.</p>
  <p>It works fine if I replace <code>shareIn</code> with <code>stateIn</code> and set <code>null</code> as initial value (third parameter) but then in <code>collect</code> callback I need to check if it's not <code>null</code> before submit <code>PagingData</code> to the adapter</p>
  <p><strong>Updated</strong></p>
  <p>It seems if values are emitted before SharedFlow was started being collected then new subscribers won't receive the latest value</p>
  <p>So I need to change <code>shareIn(viewModelScope, SharingStarted.Eagerly)</code> to</p>
  <pre><code>shareIn(viewModelScope, SharingStarted.WhileSubscribed())
  </code></pre>
  <p>or to</p>
  <pre><code>shareIn(viewModelScope, SharingStarted.Eagerly, replay = 1)
  </code></pre>
  <p>to make it work</p>
  <p>But which one is better? I just need to keep the same single instance of <code>PagingData</code></p>