Skip to content

Commit

Permalink
fix poster
Browse files Browse the repository at this point in the history
  • Loading branch information
tsynik committed May 11, 2024
1 parent d64376f commit da1f0ea
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ open class InfoFragment : TSFragment() {
return vi
}

private var poster = " "
private var posterUrl = " "
suspend fun startInfo(hash: String) = withContext(Dispatchers.Main) {
try {
viewModel = ViewModelProvider(this@InfoFragment)[InfoViewModel::class.java]
Expand All @@ -83,14 +83,14 @@ open class InfoFragment : TSFragment() {
}
info.torrent?.let { torr ->
view?.apply {
if (!torr.poster.isNullOrEmpty() && poster != torr.poster) {
poster = torr.poster!!
if (poster.isNotBlank() && Settings.showCover())
if (posterUrl != torr.poster) {
posterUrl = torr.poster ?: ""
if (posterUrl.isNotEmpty() && Settings.showCover())
findViewById<ImageView?>(R.id.ivPoster)?.let {
it.visibility = View.VISIBLE
Glide.with(this)
.asBitmap()
.load(poster)
.load(posterUrl)
.centerCrop()
//.placeholder(ColorDrawable(0x3c000000))
.apply(RequestOptions.bitmapTransform(RoundedCorners(6)))
Expand Down

0 comments on commit da1f0ea

Please sign in to comment.