downloading button cleanup

This commit is contained in:
Finnley Somdahl 2023-11-21 20:34:34 -06:00
parent c310bea0e9
commit 84c58fbe6c
12 changed files with 108 additions and 26 deletions

View file

@ -47,7 +47,7 @@ class ChapterLoaderDialog : BottomSheetDialogFragment() {
loaded = true
binding.selectorAutoText.text = chp.title
lifecycleScope.launch(Dispatchers.IO) {
if(model.loadMangaChapterImages(chp, m.selected!!, m.nameMAL!!)) {
if(model.loadMangaChapterImages(chp, m.selected!!, m.nameMAL?:m.nameRomaji)) {
val activity = currActivity()
activity?.runOnUiThread {
tryWith { dismiss() }

View file

@ -317,7 +317,7 @@ ThemeManager(this).applyTheme()
}
}
scope.launch(Dispatchers.IO) { model.loadMangaChapterImages(chapter, media.selected!!, media.nameMAL!!) }
scope.launch(Dispatchers.IO) { model.loadMangaChapterImages(chapter, media.selected!!, media.nameMAL?:media.nameRomaji) }
}
private val snapHelper = PagerSnapHelper()
@ -706,7 +706,7 @@ ThemeManager(this).applyTheme()
model.loadMangaChapterImages(
chapters[chaptersArr.getOrNull(currentChapterIndex + 1) ?: return@launch]!!,
media.selected!!,
media.nameMAL!!,
media.nameMAL?:media.nameRomaji,
false
)
loading = false