Skip to content

Commit

Permalink
refactor(export): View.visibility => isVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
Haz3-jolt authored and david-allison committed Dec 19, 2024
1 parent 70936db commit b6099d0
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -165,7 +166,7 @@ class ExportDialogFragment : DialogFragment() {
if (selectedDeck != null) {
deckSelector.setSelection(findDeckPosition(selectedDeck))
}
loadingIndicator.visibility = View.GONE
loadingIndicator.isVisible = false
deckSelector.isEnabled = true
}
}
Expand Down Expand Up @@ -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<ExportType>(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)
Expand Down

0 comments on commit b6099d0

Please sign in to comment.