fix: novel loading

This commit is contained in:
rebelonion 2024-04-21 07:36:23 -05:00
parent 513b937e59
commit 4ffe9d7505
4 changed files with 22 additions and 6 deletions

View file

@ -117,9 +117,10 @@ class NovelReadFragment : Fragment(),
context ?: currContext()!!,
MediaType.NOVEL,
false,
media.mainName(),
novel.name
)
val file = directory?.findFile(novel.name)
val file = directory?.findFile("0.epub")
if (file?.exists() == false) return false
val fileUri = file?.uri ?: return false
val intent = Intent(context, NovelReaderActivity::class.java).apply {

View file

@ -8,6 +8,7 @@ import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import ani.dantotsu.R
import ani.dantotsu.databinding.ItemNovelResponseBinding
import ani.dantotsu.loadImage
import ani.dantotsu.parsers.ShowResponse
import ani.dantotsu.setAnimation
import ani.dantotsu.snackString
@ -37,10 +38,7 @@ class NovelResponseAdapter(
val binding = holder.binding
val novel = list[position]
setAnimation(fragment.requireContext(), holder.binding.root)
val cover = GlideUrl(novel.coverUrl.url) { novel.coverUrl.headers }
Glide.with(binding.itemEpisodeImage).load(cover).override(400, 0)
.into(binding.itemEpisodeImage)
binding.itemEpisodeImage.loadImage(novel.coverUrl, 400, 0)
val typedValue = TypedValue()
fragment.requireContext().theme?.resolveAttribute(