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
1 changed files with 3 additions and 0 deletions

View File

@ -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))
}