diff --git a/app/build.gradle b/app/build.gradle index 1dbbd4cac..697211b8f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,7 +37,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.28.5' + compile 'com.simplemobiletools:commons:2.28.7' compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0' compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/App.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/App.kt index 4cbda3237..48ef23b19 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/App.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/App.kt @@ -1,12 +1,14 @@ package com.simplemobiletools.gallery import android.app.Application +import com.github.ajalt.reprint.core.Reprint import com.squareup.leakcanary.LeakCanary class App : Application() { val USE_LEAK_CANARY = false override fun onCreate() { super.onCreate() + Reprint.initialize(this) if (USE_LEAK_CANARY) { if (LeakCanary.isInAnalyzerProcess(this)) { return diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt index 92329d023..8ba896f00 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -8,6 +8,7 @@ import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.dialogs.SecurityDialog import com.simplemobiletools.commons.extensions.handleHiddenFolderPasswordProtection import com.simplemobiletools.commons.extensions.updateTextColors +import com.simplemobiletools.commons.helpers.PROTECTION_FINGERPRINT import com.simplemobiletools.commons.helpers.SHOW_ALL_TABS import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.gallery.R @@ -169,7 +170,9 @@ class SettingsActivity : SimpleActivity() { config.protectionType = type if (config.isPasswordProtectionOn) { - ConfirmationDialog(this, "", R.string.protection_setup_successfully, R.string.ok, 0) { } + val confirmationTextId = if (config.protectionType == PROTECTION_FINGERPRINT) + R.string.fingerprint_setup_successfully else R.string.protection_setup_successfully + ConfirmationDialog(this, "", confirmationTextId, R.string.ok, 0) { } } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Directory.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Directory.kt index ec877c43c..7271dc2e8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Directory.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Directory.kt @@ -17,7 +17,7 @@ data class Directory(val path: String, val tmb: String, val name: String, var me override fun compareTo(other: Directory): Int { var result: Int when { - sorting and SORT_BY_NAME != 0 -> result = AlphanumComparator().compare(name.toLowerCase(), other.name.toLowerCase()) + sorting and SORT_BY_NAME != 0 -> result = AlphanumericComparator().compare(name.toLowerCase(), other.name.toLowerCase()) sorting and SORT_BY_SIZE != 0 -> result = when { size == other.size -> 0 size > other.size -> 1 diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt index a04a39aa9..fadf715ea 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt @@ -26,7 +26,7 @@ data class Medium(var name: String, var path: String, val video: Boolean, val mo override fun compareTo(other: Medium): Int { var result: Int when { - sorting and SORT_BY_NAME != 0 -> result = AlphanumComparator().compare(name.toLowerCase(), other.name.toLowerCase()) + sorting and SORT_BY_NAME != 0 -> result = AlphanumericComparator().compare(name.toLowerCase(), other.name.toLowerCase()) sorting and SORT_BY_SIZE != 0 -> result = when { size == other.size -> 0 size > other.size -> 1