From b6099d07c22d1ba03a496c929bc0884a3acc9c3f Mon Sep 17 00:00:00 2001 From: Hari Srinivasan Date: Thu, 19 Dec 2024 13:48:21 +0530 Subject: [PATCH] refactor(export): View.visibility => isVisible --- .../com/ichi2/anki/export/ExportDialogFragment.kt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 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 1c8d6b27819a..f44ced15c15a 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/export/ExportDialogFragment.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/export/ExportDialogFragment.kt @@ -29,6 +29,7 @@ import androidx.appcompat.app.AlertDialog import androidx.core.os.BundleCompat import androidx.core.os.bundleOf import androidx.core.text.HtmlCompat +import androidx.core.view.isVisible import androidx.fragment.app.DialogFragment import androidx.lifecycle.lifecycleScope import anki.cards.cardIds @@ -165,7 +166,7 @@ class ExportDialogFragment : DialogFragment() { if (selectedDeck != null) { deckSelector.setSelection(findDeckPosition(selectedDeck)) } - loadingIndicator.visibility = View.GONE + loadingIndicator.isVisible = false deckSelector.isEnabled = true } } @@ -292,15 +293,15 @@ class ExportDialogFragment : DialogFragment() { ) { // if we export as collection there's no deck/selected items to choose from 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)