From c6de3a9e850830f1ab85317681909ea248b3d7c6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 4 Mar 2017 10:32:54 +0100 Subject: [PATCH] hide the Manage excluded folders in Settings, if nothing is excluded --- .../simplemobiletools/gallery/activities/SettingsActivity.kt | 3 +++ 1 file changed, 3 insertions(+) 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 1b3660c02..cd7be53f8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -5,6 +5,7 @@ import android.os.Bundle import com.simplemobiletools.commons.extensions.updateTextColors import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.dialogs.ShowMediaDialog +import com.simplemobiletools.gallery.extensions.beVisibleIf import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.helpers.IMAGES import com.simplemobiletools.gallery.helpers.IMAGES_AND_VIDEOS @@ -36,6 +37,8 @@ class SettingsActivity : SimpleActivity() { } private fun setupManageExcludedFolders() { + val excludedFolders = config.excludedFolders + settings_manage_excluded_folders_holder.beVisibleIf(excludedFolders.isNotEmpty()) settings_manage_excluded_folders_holder.setOnClickListener { startActivity(Intent(this, ExcludedFoldersActivity::class.java)) }