This commit is contained in:
Finnley Somdahl 2023-12-05 20:51:22 -06:00
parent b8782b0507
commit dc1edc9a42
11 changed files with 43 additions and 22 deletions

View file

@ -55,7 +55,7 @@ class InstalledAnimeExtensionsFragment : Fragment(), SearchQueryHandler {
if (allSettings.size > 1) {
val names = allSettings.map { it.lang }.toTypedArray()
var selectedIndex = 0
AlertDialog.Builder(requireContext(), R.style.MyPopup)
val dialog = AlertDialog.Builder(requireContext(), R.style.MyPopup)
.setTitle("Select a Source")
.setSingleChoiceItems(names, selectedIndex) { dialog, which ->
selectedIndex = which
@ -85,6 +85,7 @@ class InstalledAnimeExtensionsFragment : Fragment(), SearchQueryHandler {
}
}
.show()
dialog.window?.setDimAmount(0.8f)
} else {
// If there's only one setting, proceed with the fragment transaction
val eActivity = requireActivity() as ExtensionsActivity