From d6f77febfec88275cddabf8e40b27965a4bf79ae Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 25 Jan 2017 22:02:20 +0100 Subject: [PATCH] update commons to 2.5.4 --- app/build.gradle | 2 +- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 2 +- .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 2 +- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index de84e7076..5ad5dad52 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,7 +32,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.5.3' + compile 'com.simplemobiletools:commons:2.5.4' compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0' compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' 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 094870a04..67643f652 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -100,7 +100,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } private fun tryloadGallery() { - if (hasStoragePermission()) { + if (hasWriteStoragePermission()) { if (config.showAll) showAllMedia() else diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 0fb0dfcba..75ea96574 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -66,7 +66,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } private fun tryloadGallery() { - if (hasStoragePermission()) { + if (hasWriteStoragePermission()) { val dirName = getHumanizedFilename(mPath) title = if (mShowAll) resources.getString(R.string.all_folders) else dirName getMedia() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 096b32d4d..df2a26d68 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -43,7 +43,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View super.onCreate(savedInstanceState) setContentView(R.layout.activity_medium) - if (!hasStoragePermission()) { + if (!hasWriteStoragePermission()) { finish() return } @@ -84,7 +84,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View override fun onResume() { super.onResume() - if (!hasStoragePermission()) { + if (!hasWriteStoragePermission()) { finish() } supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.actionbar_gradient_background))