title: The list in recyclerview is getting duplicated when navigating to other fragment with MVVM
body: <p>The list content in recyclerview is getting duplicated when navigating to other fragment and getting back to the fragment.</p>
  <p>When a user clicks on item and navigate back to the same fragment the recyclerview is getting duplicated</p>
  <p>ViewModel:</p>
  <pre><code>    private var listMutableLiveData: MutableLiveData&lt;ArrayList&lt;OffersModelClass&gt;&gt; =
      MutableLiveData()  
  
      var arrayListMainUI: ArrayList&lt;OffersModelClass&gt; = ArrayList()
  
      val listLiveData: LiveData&lt;ArrayList&lt;OffersModelClass&gt;&gt;
          get() = listMutableLiveData
      
  
      fun loadData(reload: Boolean) {
      if (reload) {
          databaseReference.addValueEventListener(object : ValueEventListener {
              override fun onDataChange(snapshot: DataSnapshot) {
                  for (data in snapshot.children) {
  
                      val model = data.getValue(OffersModelClass::class.java)
  
                      //Getting the offer ID to load its images
                      val imageID: String = model?.imageID.toString()
  
                      val fileRef11 = FirebaseStorage.getInstance().reference.child(
                          &quot;offers/$imageID.jpg&quot;
                      )
                      fileRef11.downloadUrl.addOnSuccessListener { uri -&gt;
  
                          //Assigning the image uri and converting it to string
                          model?.ImageUri = uri.toString()
  
                          //Assigning the new time format
                          model?.Time = model?.Time?.let { calculateTimeAge(it) }
  
                          //Adding the data to arraylist as whole to observe it from the fragment
                          arrayListMainUI.add(model as OffersModelClass)
                          listMutableLiveData.postValue(arrayListMainUI)
  
                      }
                  }
  
              }
  
              override fun onCancelled(error: DatabaseError) {
                  TODO(&quot;Not yet implemented&quot;)
              }
          })
      }
  }
  </code></pre>
  <p>Fragment:</p>
  <pre><code>    recyclerView.layoutManager = LinearLayoutManager(context)
      recyclerView.setHasFixedSize(true)
  
      viewModel = ViewModelProvider(requireActivity()).get(ViewModel::class.java) 
  
       if (user != null) {
          // User is signed in
           viewModel.loadData(true)
         
      }
      viewModel.listLiveData.observe(viewLifecycleOwner, { arrayList -&gt;
          offerAdapter = OfferAdapter(arrayList)
          recyclerView.adapter = offerAdapter
          offerAdapter.notifyDataSetChanged()
      })
  </code></pre>