From 7382546e2c5559f9c655a2a442b19a97514da161 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 28 Jan 2019 11:17:09 +0100 Subject: [PATCH] handle exporting settings in a file --- app/build.gradle | 2 +- .../gallery/pro/activities/SettingsActivity.kt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a0b0a441e..95e8b7992 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -61,7 +61,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.6.19' + implementation 'com.simplemobiletools:commons:5.7.0' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt index 2371a4c7d..a65059c23 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt @@ -572,7 +572,7 @@ class SettingsActivity : SimpleActivity() { private fun setupExportSettings() { settings_export_holder.setOnClickListener { - val configItems = HashMap().apply { + val configItems = LinkedHashMap().apply { put(IS_USING_SHARED_THEME, config.isUsingSharedTheme) put(TEXT_COLOR, config.textColor) put(BACKGROUND_COLOR, config.backgroundColor) @@ -650,6 +650,8 @@ class SettingsActivity : SimpleActivity() { put(LAST_CONFLICT_RESOLUTION, config.lastConflictResolution) put(LAST_CONFLICT_APPLY_TO_ALL, config.lastConflictApplyToAll) } + + exportSettings(configItems, "gallery-settings.txt") } }