From 56f513beca1e9e033bbe28f5bbc1070de5064ebe Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 3 Oct 2017 20:40:07 +0200 Subject: [PATCH] fix a glitch at allowing adding multiple items to an email attachment --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index b25521bb1..881e50c9f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -53,6 +53,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { private var mIsGetVideoContentIntent = false private var mIsGetAnyContentIntent = false private var mIsSetWallpaperIntent = false + private var mAllowPickingMultiple = false private var mIsThirdPartyIntent = false private var mIsGettingDirs = false private var mStoredAnimateGifs = true @@ -74,6 +75,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { mIsGetVideoContentIntent = isGetVideoContentIntent(intent) mIsGetAnyContentIntent = isGetAnyContentIntent(intent) mIsSetWallpaperIntent = isSetWallpaperIntent(intent) + mAllowPickingMultiple = intent.getBooleanExtra(Intent.EXTRA_ALLOW_MULTIPLE, false) mIsThirdPartyIntent = mIsPickImageIntent || mIsPickVideoIntent || mIsGetImageContentIntent || mIsGetVideoContentIntent || mIsGetAnyContentIntent || mIsSetWallpaperIntent @@ -495,7 +497,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { putExtra(GET_IMAGE_INTENT, mIsPickImageIntent || mIsGetImageContentIntent) putExtra(GET_VIDEO_INTENT, mIsPickVideoIntent || mIsGetVideoContentIntent) putExtra(GET_ANY_INTENT, mIsGetAnyContentIntent) - putExtra(Intent.EXTRA_ALLOW_MULTIPLE, intent.getBooleanExtra(Intent.EXTRA_ALLOW_MULTIPLE, false)) + putExtra(Intent.EXTRA_ALLOW_MULTIPLE, mAllowPickingMultiple) startActivityForResult(this, PICK_MEDIA) } }