hide the Manage excluded folders in Settings, if nothing is excluded

This commit is contained in:
tibbi 2017-03-04 10:32:54 +01:00
parent cf546e3c60
commit c6de3a9e85

View file

@ -5,6 +5,7 @@ import android.os.Bundle
import com.simplemobiletools.commons.extensions.updateTextColors import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.R
import com.simplemobiletools.gallery.dialogs.ShowMediaDialog import com.simplemobiletools.gallery.dialogs.ShowMediaDialog
import com.simplemobiletools.gallery.extensions.beVisibleIf
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.extensions.config
import com.simplemobiletools.gallery.helpers.IMAGES import com.simplemobiletools.gallery.helpers.IMAGES
import com.simplemobiletools.gallery.helpers.IMAGES_AND_VIDEOS import com.simplemobiletools.gallery.helpers.IMAGES_AND_VIDEOS
@ -36,6 +37,8 @@ class SettingsActivity : SimpleActivity() {
} }
private fun setupManageExcludedFolders() { private fun setupManageExcludedFolders() {
val excludedFolders = config.excludedFolders
settings_manage_excluded_folders_holder.beVisibleIf(excludedFolders.isNotEmpty())
settings_manage_excluded_folders_holder.setOnClickListener { settings_manage_excluded_folders_holder.setOnClickListener {
startActivity(Intent(this, ExcludedFoldersActivity::class.java)) startActivity(Intent(this, ExcludedFoldersActivity::class.java))
} }