diff --git a/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/torrents/TorrentsAdapter.kt b/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/torrents/TorrentsAdapter.kt index 56d0ef23..93dd2989 100644 --- a/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/torrents/TorrentsAdapter.kt +++ b/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/torrents/TorrentsAdapter.kt @@ -64,7 +64,7 @@ class TorrentsAdapter(private val activity: FragmentActivity) : BaseAdapter() { title = list[position].name vi.findViewById(R.id.ivPoster)?.visibility = View.GONE - if (poster.isNotEmpty() && Settings.showCover()) + if (!poster.isNullOrBlank() && Settings.showCover()) vi.findViewById(R.id.ivPoster)?.let { it.visibility = View.VISIBLE Glide.with(activity) diff --git a/app/src/main/java/ru/yourok/torrserve/ui/fragments/play/InfoFragment.kt b/app/src/main/java/ru/yourok/torrserve/ui/fragments/play/InfoFragment.kt index 24096750..165f72f7 100644 --- a/app/src/main/java/ru/yourok/torrserve/ui/fragments/play/InfoFragment.kt +++ b/app/src/main/java/ru/yourok/torrserve/ui/fragments/play/InfoFragment.kt @@ -83,9 +83,9 @@ open class InfoFragment : TSFragment() { } info.torrent?.let { torr -> view?.apply { - if (poster != torr.poster) { - poster = torr.poster - if (poster.isNotEmpty() && Settings.showCover()) + if (!torr.poster.isNullOrEmpty() && poster != torr.poster) { + poster = torr.poster!! + if (poster.isNotBlank() && Settings.showCover()) findViewById(R.id.ivPoster)?.let { it.visibility = View.VISIBLE Glide.with(this)