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

@ -338,7 +338,7 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
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
@ -365,6 +365,7 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
return@setNegativeButton
}
.show()
dialog.window?.setDimAmount(0.8f)
} else {
// If there's only one setting, proceed with the fragment transaction
val fragment = MangaSourcePreferencesFragment().getInstance(selectedSetting.id) {