title: How to change or update the value of a specific item in MutableLiveData
body: <p>Here <code>allPdfs</code> is <code>MutableLiveData&lt;List&lt;AllPdfModel&gt;&gt;</code> and I want to change/update the value of that specific item when the file is renamed. The file name is changing successfully but <code>MutableLiveData</code> is not changing in real-time. And <code>MutableLiveData</code> is working with <code>remove(position)</code> method in real-time but not with <code>set(position, newName)</code>.</p>
  <pre><code>     val allPdfs = MutableLiveData&lt;List&lt;AllPdfModel&gt;&gt;()
  
       private fun renamingFile(filePath: String, position: Int, newName: String): Boolean{
              val oldFile: File = getFileFromPath(filePath)
              val oldPath = oldFile.path
              val newFileName = (oldPath.substring(0, oldPath.lastIndexOf('/'))
                      + &quot;/&quot; + newName + &quot;.pdf&quot;)
              val newFile = File(newFileName)
              return if (oldFile.renameTo(newFile)) {
                  val newItem: AllPdfModel? = allPdfList.value?.get(position)
                  newItem?.name = newName
                  allPdfs.value = allPdfs.value?.toMutableList()?.apply {
                      set(position, newItem!!)
                  }?.toList()
                  true
              } else{
                  false
              }
          }
  </code></pre>