From 3418d65fedb650b64fe64a05486d2da6ba84a895 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Fri, 3 May 2024 23:57:47 +0300 Subject: [PATCH] fix build --- .../torrserve/ui/fragments/main/torrents/TorrentsAdapter.kt | 2 +- .../ru/yourok/torrserve/ui/fragments/play/InfoFragment.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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)