Fix popular not working in M+. (#13953)
This commit is contained in:
parent
3c49304709
commit
d5dd9308d1
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'MANGA Plus by SHUEISHA'
|
extName = 'MANGA Plus by SHUEISHA'
|
||||||
pkgNameSuffix = 'all.mangaplus'
|
pkgNameSuffix = 'all.mangaplus'
|
||||||
extClass = '.MangaPlusFactory'
|
extClass = '.MangaPlusFactory'
|
||||||
extVersionCode = 38
|
extVersionCode = 39
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -199,7 +199,7 @@ class MangaPlus(
|
||||||
.filter { it.language == langCode }
|
.filter { it.language == langCode }
|
||||||
.filter { title ->
|
.filter { title ->
|
||||||
title.name.contains(filter, ignoreCase = true) ||
|
title.name.contains(filter, ignoreCase = true) ||
|
||||||
title.author.contains(filter, ignoreCase = true)
|
title.author.orEmpty().contains(filter, ignoreCase = true)
|
||||||
}
|
}
|
||||||
|
|
||||||
val mangas = titleList!!.map(Title::toSManga)
|
val mangas = titleList!!.map(Title::toSManga)
|
||||||
|
|
|
@ -56,7 +56,7 @@ data class WebHomeViewV3(val groups: List<UpdatedTitleV2Group> = emptyList())
|
||||||
data class TitleDetailView(
|
data class TitleDetailView(
|
||||||
val title: Title,
|
val title: Title,
|
||||||
val titleImageUrl: String,
|
val titleImageUrl: String,
|
||||||
val overview: String,
|
val overview: String? = null,
|
||||||
val backgroundImageUrl: String,
|
val backgroundImageUrl: String,
|
||||||
val nextTimeStamp: Int = 0,
|
val nextTimeStamp: Int = 0,
|
||||||
val viewingPeriodDescription: String = "",
|
val viewingPeriodDescription: String = "",
|
||||||
|
@ -92,7 +92,7 @@ data class TitleDetailView(
|
||||||
)
|
)
|
||||||
|
|
||||||
fun toSManga(): SManga = title.toSManga().apply {
|
fun toSManga(): SManga = title.toSManga().apply {
|
||||||
description = overview + "\n\n" + viewingPeriodDescription
|
description = (overview.orEmpty() + "\n\n" + viewingPeriodDescription).trim()
|
||||||
status = if (isCompleted) SManga.COMPLETED else SManga.ONGOING
|
status = if (isCompleted) SManga.COMPLETED else SManga.ONGOING
|
||||||
genre = genres.joinToString()
|
genre = genres.joinToString()
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ data class MangaViewer(
|
||||||
data class Title(
|
data class Title(
|
||||||
val titleId: Int,
|
val titleId: Int,
|
||||||
val name: String,
|
val name: String,
|
||||||
val author: String,
|
val author: String? = null,
|
||||||
val portraitImageUrl: String,
|
val portraitImageUrl: String,
|
||||||
val landscapeImageUrl: String,
|
val landscapeImageUrl: String,
|
||||||
val viewCount: Int = 0,
|
val viewCount: Int = 0,
|
||||||
|
@ -123,7 +123,7 @@ data class Title(
|
||||||
|
|
||||||
fun toSManga(): SManga = SManga.create().apply {
|
fun toSManga(): SManga = SManga.create().apply {
|
||||||
title = name
|
title = name
|
||||||
author = this@Title.author.replace(" / ", ", ")
|
author = this@Title.author?.replace(" / ", ", ")
|
||||||
artist = author
|
artist = author
|
||||||
thumbnail_url = portraitImageUrl
|
thumbnail_url = portraitImageUrl
|
||||||
url = "#/titles/$titleId"
|
url = "#/titles/$titleId"
|
||||||
|
|
Loading…
Reference in New Issue