From 6be55d391a46eef4e42c146cccbfa0b7a6d1e082 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 16 Mar 2017 00:10:56 +0100 Subject: [PATCH] update the breadcrumb color if it was changed --- app/build.gradle | 2 +- .../filemanager/activities/MainActivity.kt | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 2c94a5a7..ca64208c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,7 +32,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.12.0' + compile 'com.simplemobiletools:commons:2.12.1' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt index d4909276..d2035d45 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt @@ -29,6 +29,7 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br var mBasePath = getInternalStoragePath() var latestFragment: ItemsFragment? = null var mScrollStates = HashMap() + var mStoredTextColor = 0 companion object { private val STORAGE_PERMISSION = 1 @@ -48,6 +49,16 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br override fun onResume() { super.onResume() updateTextColors(main_screen) + if (mStoredTextColor != config.textColor) { + mStoredTextColor = config.textColor + breadcrumbs.setTextColor(mStoredTextColor) + initRootFileManager() + } + } + + override fun onPause() { + super.onPause() + mStoredTextColor = config.textColor } override fun onDestroy() {