fix: clean up some warnings

This commit is contained in:
rebelonion 2024-03-23 18:05:43 -05:00
parent ab7bc15573
commit 1b50ffcf11
32 changed files with 50 additions and 301 deletions

View file

@ -449,7 +449,7 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
model.mangaReadSources?.get(media.selected!!.sourceIndex) as? DynamicMangaParser
parser?.let {
CoroutineScope(Dispatchers.IO).launch {
val images = parser.imageList("", chapter.sChapter)
val images = parser.imageList(chapter.sChapter)
// Create a download task
val downloadTask = MangaDownloaderService.DownloadTask(

View file

@ -4,7 +4,6 @@ import android.annotation.SuppressLint
import android.content.Context
import android.graphics.Bitmap
import android.graphics.Canvas
import android.net.Uri
import android.view.HapticFeedbackConstants
import android.view.MotionEvent
import android.view.View
@ -26,7 +25,6 @@ import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.load.model.GlideUrl
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation
import eu.kanade.tachiyomi.source.model.Page
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@ -162,7 +160,6 @@ abstract class BaseImageAdapter(
Glide.with(this@loadBitmap)
.asBitmap()
.let {
val fileUri = Uri.fromFile(File(link.url)).toString()
val localFile = File(link.url)
if (localFile.exists()) {
it.load(localFile.absoluteFile)
@ -211,8 +208,4 @@ abstract class BaseImageAdapter(
}
}
}
interface ImageFetcher {
suspend fun fetchImage(page: Page): Bitmap?
}

View file

@ -49,8 +49,7 @@ class ChapterLoaderDialog : BottomSheetDialogFragment() {
lifecycleScope.launch(Dispatchers.IO) {
if (model.loadMangaChapterImages(
chp,
m.selected!!,
m.mainName()
m.selected!!
)
) {
val activity = currActivity()

View file

@ -415,8 +415,7 @@ class MangaReaderActivity : AppCompatActivity() {
scope.launch(Dispatchers.IO) {
model.loadMangaChapterImages(
chapter,
media.selected!!,
media.mainName()
media.selected!!
)
}
}
@ -938,7 +937,6 @@ class MangaReaderActivity : AppCompatActivity() {
model.loadMangaChapterImages(
chapters[chaptersArr.getOrNull(currentChapterIndex + 1) ?: return@launch]!!,
media.selected!!,
media.mainName(),
false
)
loading = false