From bf7ca41df887d38fbae1620e924854bb288631b5 Mon Sep 17 00:00:00 2001 From: Hari Srinivasan Date: Thu, 19 Dec 2024 10:53:54 +0530 Subject: [PATCH] Refactoring visibility to isVisible --- .../ichi2/anki/export/ExportDialogFragment.kt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/export/ExportDialogFragment.kt b/AnkiDroid/src/main/java/com/ichi2/anki/export/ExportDialogFragment.kt index 3aabd461ea74..61f13a30fa6c 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/export/ExportDialogFragment.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/export/ExportDialogFragment.kt @@ -166,7 +166,7 @@ class ExportDialogFragment : DialogFragment() { if (selectedDeck != null) { deckSelector.setSelection(findDeckPosition(selectedDeck)) } - loadingIndicator.visibility = View.GONE + loadingIndicator.isVisible = false deckSelector.isEnabled = true } } @@ -297,21 +297,20 @@ class ExportDialogFragment : DialogFragment() { config.layoutId == targetConfig.layoutId } if (targetConfig.layoutId == R.id.export_extras_collection) { - decksSelectorContainer.visibility = View.GONE - selectedLabel.visibility = View.GONE + decksSelectorContainer.isVisible = false + selectedLabel.isVisible = false } else { if (arguments?.getSerializableCompat(ARG_TYPE) != null) { - decksSelectorContainer.visibility = View.GONE - selectedLabel.visibility = View.VISIBLE + decksSelectorContainer.isVisible = false + selectedLabel.isVisible = true } else { - decksSelectorContainer.visibility = View.VISIBLE - selectedLabel.visibility = View.GONE + decksSelectorContainer.isVisible = true + selectedLabel.isVisible = false } } exportTypeSelector.setSelection(targetConfig.index) ExportConfiguration.entries.forEach { config -> - container.findViewById(config.layoutId).visibility = - if (config.layoutId == targetConfig.layoutId) View.VISIBLE else View.GONE + container.findViewById(config.layoutId).isVisible = config.layoutId == targetConfig.layoutId } }