From d05f3b7d8d73f2ea9e2b3af866bc179b8b89ec97 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 10 Jun 2019 23:34:43 +0200 Subject: [PATCH] fetch video resolutions at videofragment on a background thread --- .../gallery/pro/fragments/VideoFragment.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt index fb6f9cde7..a7829beea 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt @@ -139,10 +139,12 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S initTimeHolder() checkIfPanorama() - activity?.getVideoResolution(mMedium.path)?.apply { - mVideoSize.x = x - mVideoSize.y = y - } + Thread { + activity?.getVideoResolution(mMedium.path)?.apply { + mVideoSize.x = x + mVideoSize.y = y + } + }.start() if (mIsPanorama) { mView.apply {