diff --git a/app/src/main/java/fr/free/nrw/commons/customselector/ui/selector/ImageFragment.kt b/app/src/main/java/fr/free/nrw/commons/customselector/ui/selector/ImageFragment.kt index 39d0d545a0..1c62047c33 100644 --- a/app/src/main/java/fr/free/nrw/commons/customselector/ui/selector/ImageFragment.kt +++ b/app/src/main/java/fr/free/nrw/commons/customselector/ui/selector/ImageFragment.kt @@ -10,6 +10,7 @@ import android.view.View import android.view.ViewGroup import android.widget.ProgressBar import android.widget.Switch +import android.widget.TextView import androidx.appcompat.app.AlertDialog import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.view.isVisible @@ -82,6 +83,7 @@ class ImageFragment : private var loader: ProgressBar? = null private var switch: Switch? = null lateinit var filteredImages: ArrayList + private var appreciationText : TextView? = null /** * Stores all images @@ -226,6 +228,7 @@ class ImageFragment : }, ) + appreciationText = binding?.appreciationText switch = binding?.switchWidget switch?.visibility = View.VISIBLE _switchState.value = switch?.isChecked ?: false @@ -277,6 +280,7 @@ class ImageFragment : private fun onChangeSwitchState(checked: Boolean) { if (checked) { showAlreadyActionedImages = true + appreciationText?.visibility = View.GONE val sharedPreferences: SharedPreferences = requireContext().getSharedPreferences(CUSTOM_SELECTOR_PREFERENCE_KEY, MODE_PRIVATE) val editor = sharedPreferences.edit() @@ -338,6 +342,10 @@ class ImageFragment : allImages = filteredImages binding?.emptyText?.let { it.visibility = View.VISIBLE + if (!showAlreadyActionedImages) { + appreciationText?.visibility = View.VISIBLE + + } } selectorRV?.let { it.visibility = View.GONE diff --git a/app/src/main/res/layout/fragment_custom_selector.xml b/app/src/main/res/layout/fragment_custom_selector.xml index 03381fd243..58ff40cebc 100644 --- a/app/src/main/res/layout/fragment_custom_selector.xml +++ b/app/src/main/res/layout/fragment_custom_selector.xml @@ -18,6 +18,18 @@ android:padding="@dimen/dimen_10" android:checked="true" /> + + + Marking as not for upload Unmarking as not for upload Show already actioned pictures + Good job!\nAll pictures of this album have been either uploaded or marked as not for upload.\nHow about going for a walk and taking pictures of nearby notable places? + + Hiding already actioned pictures No more images found This image is already uploaded