manga progress check fix

This commit is contained in:
Finnley Somdahl 2024-01-09 06:05:01 -06:00
parent 158ea60047
commit e3e3965795

View file

@ -255,7 +255,7 @@ class MangaReaderActivity : AppCompatActivity() {
} }
showProgressDialog = showProgressDialog =
if (settings.askIndividual) loadData<Boolean>("${media.id}_progressDialog") != true else false if (settings.askIndividual) loadData<Boolean>("${media.id}_progressDialog")?: true else false
//Chapter Change //Chapter Change
fun change(index: Int) { fun change(index: Int) {
@ -849,13 +849,15 @@ class MangaReaderActivity : AppCompatActivity() {
private fun progress(runnable: Runnable) { private fun progress(runnable: Runnable) {
if (maxChapterPage - currentChapterPage <= 1 && Anilist.userid != null) { if (maxChapterPage - currentChapterPage <= 1 && Anilist.userid != null) {
showProgressDialog =
if (settings.askIndividual) loadData<Boolean>("${media.id}_progressDialog")?: true else false
if (showProgressDialog) { if (showProgressDialog) {
val dialogView = layoutInflater.inflate(R.layout.item_custom_dialog, null) val dialogView = layoutInflater.inflate(R.layout.item_custom_dialog, null)
val checkbox = dialogView.findViewById<CheckBox>(R.id.dialog_checkbox) val checkbox = dialogView.findViewById<CheckBox>(R.id.dialog_checkbox)
checkbox.text = getString(R.string.dont_ask_again, media.userPreferredName) checkbox.text = getString(R.string.dont_ask_again, media.userPreferredName)
checkbox.setOnCheckedChangeListener { _, isChecked -> checkbox.setOnCheckedChangeListener { _, isChecked ->
saveData("${media.id}_progressDialog", isChecked) saveData("${media.id}_progressDialog", !isChecked)
showProgressDialog = !isChecked showProgressDialog = !isChecked
} }
val incognito = val incognito =