downloaded anime page bug fixes (#132)

* after changing grid style items are not accessible fixed

* added total ep released no

* padding fix

* fixed scroll to top coinciding with navbar

* small change
This commit is contained in:
aayush262 2024-01-15 21:31:41 +05:30 committed by GitHub
parent 98cb11e841
commit bd6197031a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 80 additions and 82 deletions

View file

@ -12,8 +12,6 @@ import android.widget.LinearLayout
import android.widget.TextView
import androidx.cardview.widget.CardView
import ani.dantotsu.R
import ani.dantotsu.download.anime.OfflineAnimeModel
import ani.dantotsu.download.anime.OfflineAnimeSearchListener
class OfflineAnimeAdapter(
@ -54,22 +52,22 @@ class OfflineAnimeAdapter(
val itemScore = view.findViewById<TextView>(R.id.itemCompactScore)
val itemScoreBG = view.findViewById<View>(R.id.itemCompactScoreBG)
val ongoing = view.findViewById<CardView>(R.id.itemCompactOngoing)
val totalchapter = view.findViewById<TextView>(R.id.itemCompactTotal)
val totalepisodes = view.findViewById<TextView>(R.id.itemCompactTotal)
val typeimage = view.findViewById<ImageView>(R.id.itemCompactTypeImage)
val type = view.findViewById<TextView>(R.id.itemCompactRelation)
val typeView = view.findViewById<LinearLayout>(R.id.itemCompactType)
if (style == 0) {
val bannerView = view.findViewById<ImageView>(R.id.itemCompactBanner) // for large view
val chapters = view.findViewById<TextView>(R.id.itemTotal)
chapters.text = " Chapters"
val episodes = view.findViewById<TextView>(R.id.itemTotal)
episodes.text = " Episodes"
bannerView.setImageURI(item.banner)
totalchapter.text = item.totalEpisode
totalepisodes.text = item.totalEpisodeList
} else if (style == 1) {
val readchapter =
val watchedEpisodes =
view.findViewById<TextView>(R.id.itemCompactUserProgress) // for compact view
readchapter.text = item.watchedEpisode
totalchapter.text = " | " + item.totalEpisode
watchedEpisodes.text = item.watchedEpisode
totalepisodes.text = " | " + item.totalEpisode
}
// Bind item data to the views