From 7affe4f6afff034079b3a7de2b0e05bd666f981e Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 22 Nov 2019 15:49:02 +0100 Subject: [PATCH] adding some crashfixes at fullscreen fragments --- .../simplemobiletools/gallery/pro/fragments/PhotoFragment.kt | 2 +- .../simplemobiletools/gallery/pro/fragments/VideoFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index 60d85a7aa..10f85ce02 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -771,7 +771,7 @@ class PhotoFragment : ViewPagerFragment() { this.mIsFullscreen = isFullscreen mView.apply { photo_details.apply { - if (mStoredShowExtendedDetails && isVisible()) { + if (mStoredShowExtendedDetails && isVisible() && context != null) { animate().y(getExtendedDetailsY(height)) if (mStoredHideExtendedDetails) { 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 e3bd29731..df99218b9 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 @@ -460,7 +460,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S mTimeHolder.animate().alpha(newAlpha).start() mView.video_details.apply { - if (mStoredShowExtendedDetails && isVisible()) { + if (mStoredShowExtendedDetails && isVisible() && context != null) { animate().y(getExtendedDetailsY(height)) if (mStoredHideExtendedDetails) {