[Android] Force the TV main fragment to update when an item title has changed

Nicolas Pomepuy git at videolan.org
Wed Feb 9 14:56:39 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Feb  9 13:52:09 2022 +0100| [36cc0b42bf24680ac9c24d48caca3f36bae14ae8] | committer: Nicolas Pomepuy

Force the TV main fragment to update when an item title has changed

> https://code.videolan.org/videolan/vlc-android/commit/36cc0b42bf24680ac9c24d48caca3f36bae14ae8
---

 .../main/java/org/videolan/television/ui/MediaItemDetailsFragment.kt    | 1 -
 .../television/src/main/java/org/videolan/television/ui/TvUtil.kt       | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/application/television/src/main/java/org/videolan/television/ui/MediaItemDetailsFragment.kt b/application/television/src/main/java/org/videolan/television/ui/MediaItemDetailsFragment.kt
index 5e4aceb3c..326a6aaea 100644
--- a/application/television/src/main/java/org/videolan/television/ui/MediaItemDetailsFragment.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/MediaItemDetailsFragment.kt
@@ -26,7 +26,6 @@ import android.content.Intent
 import android.os.Build
 import android.os.Bundle
 import android.os.Parcelable
-import android.util.Log
 import android.widget.Toast
 import androidx.core.content.ContextCompat
 import androidx.core.net.toUri
diff --git a/application/television/src/main/java/org/videolan/television/ui/TvUtil.kt b/application/television/src/main/java/org/videolan/television/ui/TvUtil.kt
index d409f3166..f35a58677 100644
--- a/application/television/src/main/java/org/videolan/television/ui/TvUtil.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/TvUtil.kt
@@ -69,7 +69,7 @@ object TvUtil {
 
     var diffCallback: DiffCallback<MediaLibraryItem> = object : DiffCallback<MediaLibraryItem>() {
         override fun areItemsTheSame(oldItem: MediaLibraryItem, newItem: MediaLibraryItem): Boolean {
-            return oldItem.equals(newItem)
+            return oldItem.equals(newItem) && oldItem.title == newItem.title
         }
 
         @SuppressLint("DiffUtilEquals")



More information about the Android mailing list