From 6aa597bdaf1556b17c769682775cedf78499b687 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 24 Jun 2019 00:13:32 +0200 Subject: [PATCH] always underline the "Change Filters" placeholder text --- .../simplemobiletools/gallery/pro/activities/MainActivity.kt | 3 ++- .../simplemobiletools/gallery/pro/activities/MediaActivity.kt | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index 117eda6f8..e6268ccfb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -1003,7 +1003,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { if (dirs.isEmpty() && config.filterMedia == TYPE_DEFAULT_FILTER) { directories_empty_text_label.text = getString(R.string.no_media_add_included) directories_empty_text.text = getString(R.string.add_folder) - directories_empty_text.underlineText() directories_empty_text.setOnClickListener { showAddIncludedFolderDialog { @@ -1013,11 +1012,13 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { } else { directories_empty_text_label.text = getString(R.string.no_media_with_filters) directories_empty_text.text = getString(R.string.change_filters_underlined) + directories_empty_text.setOnClickListener { showFilterMediaDialog() } } + directories_empty_text.underlineText() directories_grid.beVisibleIf(directories_empty_text_label.isGone()) } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index e2043f87d..1e8f78974 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -846,6 +846,10 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { media_refresh_layout.isRefreshing = false media_empty_text_label.beVisibleIf(media.isEmpty() && !isFromCache) media_empty_text.beVisibleIf(media.isEmpty() && !isFromCache) + + if (media_empty_text_label.isVisible()) { + media_empty_text_label.text = getString(R.string.no_media_with_filters) + } media_grid.beVisibleIf(media_empty_text_label.isGone()) val viewType = config.getFolderViewType(if (mShowAll) SHOW_ALL else mPath)