title: Remove item using LiveData and ViewModel causes re-emitting
body: <p>I have a fragment showing a list of items, observing from view model (from a http service, they are not persisted in database). Now, I need to delete one of those items. I have a delete result live data so the view can observe when an item has been deleted.</p>
  <p><strong>Fragment</strong></p>
  <pre><code>fun onViewCreated(view: View, savedInstanceState: Bundle?) {
      //...
      viewModel.deleteItemLiveData.observe(viewLifecycleOwner) {
          when (it.status) {
              Result.Status.ERROR -&gt; showDeletingError()
              Result.Status.SUCCESS -&gt; {
                  itemsAdapter.remove(it.value)
                  commentsAdapter.notifyItemRemoved(it.value)
              }
          }
      }
  
  }
  
  fun deleteItem(itemId: String, itemIndex: Int) = lifecycleScope.launch {
      viewModel.deleteItem(itemId, itemIndex) 
  }
  </code></pre>
  <p><strong>ViewModel</strong></p>
  <pre><code>val deleteItemLiveData = MutableLiveData&lt;Result&lt;Int&gt;&gt;()
  
  suspend fun deleteItem(itemId: String, itemIndex: Int) = withContext(Dispatchers.IO) {
      val result = service.deleteItem(itemId)
      withContext(Dispatchers.Main) {
          if (result.success) {
              deleteItemLiveData.value = Result.success(itemIndex)
          } else {
              deleteItemLiveData.value = Result.error()
          }
      }
  }
  </code></pre>
  <p>It is working fine, but the problem comes when I navigate to another fragment and go back again. <code>deleteItemLIveData</code> is emitted again with the last <code>Result</code>, so fragment tries to remove again the item from the adapter, and it crashes.</p>
  <p>How con I solve this?</p>