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

@ -318,7 +318,7 @@ class AnimeWatchFragment : Fragment() {
if (allSettings.size > 1) {
val names = allSettings.map { it.lang }.toTypedArray()
var selectedIndex = 0
AlertDialog.Builder(requireContext())
val dialog = AlertDialog.Builder(requireContext())
.setTitle("Select a Source")
.setSingleChoiceItems(names, selectedIndex) { _, which ->
selectedIndex = which
@ -347,6 +347,7 @@ class AnimeWatchFragment : Fragment() {
return@setNegativeButton
}
.show()
dialog.window?.setDimAmount(0.8f)
} else {
// If there's only one setting, proceed with the fragment transaction
requireActivity().runOnUiThread {