From 6ac6109d5e5b97abfdc61555408c2f86ea8d6f54 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 30 Mar 2018 18:49:29 +0200 Subject: [PATCH] update commons to 3.17.14 --- app/build.gradle | 3 +-- .../com/simplemobiletools/gallery/extensions/Activity.kt | 2 +- .../com/simplemobiletools/gallery/extensions/Context.kt | 3 +-- build.gradle | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3f01904bc..5a7f62277 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,10 +46,9 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.16.15' + implementation 'com.simplemobiletools:commons:3.17.14' implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0' implementation 'com.android.support:multidex:1.0.3' - implementation 'com.google.code.gson:gson:2.8.2' implementation 'it.sephiroth.android.exif:library:1.0.1' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.8' implementation 'com.github.chrisbanes:PhotoView:2.1.3' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt index 7f9faf911..f15f4687e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt @@ -235,7 +235,7 @@ fun Activity.loadJpg(path: String, target: MySquareImageView, cropThumbnails: Bo fun Activity.getCachedDirectories(): ArrayList { val token = object : TypeToken>() {}.type - return Gson().fromJson>(config.directories, token) ?: ArrayList(1) + return Gson().fromJson>(config.directories, token) ?: ArrayList(1) } fun Activity.getCachedMedia(path: String): ArrayList { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt index fde901b01..7ae1f87d4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt @@ -161,6 +161,5 @@ fun Context.updateStoredDirectories() { fun Context.storeDirectoryItems(items: ArrayList) { val subList = items.subList(0, Math.min(SAVE_DIRS_CNT, items.size)) - val directories = Gson().toJson(subList) - config.directories = directories + config.directories = Gson().toJson(subList) } diff --git a/build.gradle b/build.gradle index f056ba19c..e6abf43e1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.2.30' + ext.kotlin_version = '1.2.31' repositories { jcenter() @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' + classpath 'com.android.tools.build:gradle:3.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong