Skip to content
Snippets Groups Projects
Commit d2874029 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Fix TypeCastException

parent 0376ea69
No related branches found
No related tags found
No related merge requests found
Pipeline #11666 passed with stage
in 27 minutes and 43 seconds
......@@ -71,9 +71,8 @@ object TvUtil {
override fun areContentsTheSame(oldItem: MediaLibraryItem, newItem: MediaLibraryItem): Boolean {
if (oldItem.itemType == MediaLibraryItem.TYPE_DUMMY) return TextUtils.equals(oldItem.description, newItem.description)
if (oldItem.itemType != MediaLibraryItem.TYPE_MEDIA) return true
val oldMedia = oldItem as AbstractMediaWrapper
val newMedia = newItem as AbstractMediaWrapper
val oldMedia = oldItem as? AbstractMediaWrapper ?: return true
val newMedia = newItem as? AbstractMediaWrapper ?: return true
return oldMedia === newMedia || (oldMedia.time == newMedia.time
&& TextUtils.equals(oldMedia.artworkMrl, newMedia.artworkMrl)
&& oldMedia.seen == newMedia.seen)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment