forked from recloudstream/cloudstream
[Bugfix] Better fullscreen poster resolution. (#1081)
This commit is contained in:
parent
022aebd376
commit
183dafc54c
1 changed files with 13 additions and 11 deletions
|
@ -96,6 +96,7 @@ import kotlinx.android.synthetic.main.result_recommendations.*
|
||||||
import kotlinx.android.synthetic.main.result_sync.*
|
import kotlinx.android.synthetic.main.result_sync.*
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
|
import kotlinx.coroutines.runBlocking
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
@ -1746,7 +1747,7 @@ class ResultFragment : Fragment(), PanelsChildGestureRegionObserver.GestureRegio
|
||||||
result_poster_holder?.setOnClickListener {
|
result_poster_holder?.setOnClickListener {
|
||||||
try {
|
try {
|
||||||
context?.let { ctx ->
|
context?.let { ctx ->
|
||||||
val bitmap = result_poster.drawable.toBitmap()
|
runBlocking {
|
||||||
val sourceBuilder = AlertDialog.Builder(ctx)
|
val sourceBuilder = AlertDialog.Builder(ctx)
|
||||||
sourceBuilder.setView(R.layout.result_poster)
|
sourceBuilder.setView(R.layout.result_poster)
|
||||||
|
|
||||||
|
@ -1755,12 +1756,13 @@ class ResultFragment : Fragment(), PanelsChildGestureRegionObserver.GestureRegio
|
||||||
|
|
||||||
sourceDialog.findViewById<ImageView?>(R.id.imgPoster)
|
sourceDialog.findViewById<ImageView?>(R.id.imgPoster)
|
||||||
?.apply {
|
?.apply {
|
||||||
setImageBitmap(bitmap)
|
setImage(posterImageLink)
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
sourceDialog.dismissSafe()
|
sourceDialog.dismissSafe()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
logError(e)
|
logError(e)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue