Skip to content

Commit

Permalink
Refactoring visibility to isVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
Haz3-jolt committed Dec 19, 2024
1 parent e90ba95 commit bf7ca41
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,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 @@ -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<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)
ExportConfiguration.entries.forEach { config ->
container.findViewById<View>(config.layoutId).visibility =
if (config.layoutId == targetConfig.layoutId) View.VISIBLE else View.GONE
container.findViewById<View>(config.layoutId).isVisible = config.layoutId == targetConfig.layoutId
}
}

Expand Down

0 comments on commit bf7ca41

Please sign in to comment.