From a6cc35fc97a505ab43e64888f6b1230a147bbc5d Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 4 Jul 2018 11:39:19 +0200 Subject: [PATCH] replace some toList calls with toMutableList, for proper casting if empty --- app/build.gradle | 2 +- .../simplemobiletools/gallery/adapters/DirectoryAdapter.kt | 6 +++--- .../com/simplemobiletools/gallery/extensions/Context.kt | 2 +- .../com/simplemobiletools/gallery/helpers/MediaFetcher.kt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9b3c18d78..f8748d9c1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -47,7 +47,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:4.3.25' + implementation 'com.simplemobiletools:commons:4.3.26' implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0' implementation 'com.android.support:multidex:1.0.3' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index f16dab1fc..6a165bdeb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -158,7 +158,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt index 5621593d9..c63840b80 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt @@ -114,7 +114,7 @@ class MediaFetcher(val context: Context) { val foldersToIgnore = arrayListOf("/storage/emulated/legacy") val config = context.config val includedFolders = config.includedFolders - var foldersToScan = config.everShownFolders.toList() as ArrayList + var foldersToScan = config.everShownFolders.toMutableList() as ArrayList cursor.use { if (cursor.moveToFirst()) {