mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
一级目录正文可以显示更新时间规则(ChapterInfo)的内容
This commit is contained in:
parent
2973ce9397
commit
40ad8438ab
@ -262,8 +262,8 @@ object WebBook {
|
|||||||
return bookChapter.url
|
return bookChapter.url
|
||||||
}
|
}
|
||||||
if(bookChapter.isVolume && bookChapter.url == bookChapter.title) {
|
if(bookChapter.isVolume && bookChapter.url == bookChapter.title) {
|
||||||
Debug.log(bookSource.bookSourceUrl, "⇒一级目录获取链接为空,正文返回空白")
|
Debug.log(bookSource.bookSourceUrl, "⇒一级目录获取链接为空,使用${bookChapter.tag}")
|
||||||
return ""
|
return bookChapter.tag ?: ""
|
||||||
}
|
}
|
||||||
return if (bookChapter.url == book.bookUrl && !book.tocHtml.isNullOrEmpty()) {
|
return if (bookChapter.url == book.bookUrl && !book.tocHtml.isNullOrEmpty()) {
|
||||||
BookContent.analyzeContent(
|
BookContent.analyzeContent(
|
||||||
|
@ -129,7 +129,7 @@ object ChapterProvider {
|
|||||||
matcher.appendTail(sb)
|
matcher.appendTail(sb)
|
||||||
text = sb.toString()
|
text = sb.toString()
|
||||||
val isTitle = index == 0
|
val isTitle = index == 0
|
||||||
val isVolumeTitle = bookChapter.isVolume && isTitle && bookChapter.url == bookChapter.title
|
val isVolumeTitle = bookChapter.isVolume && isTitle && bookChapter.url == bookChapter.title && bookChapter.tag.isNullOrBlank()
|
||||||
val textPaint = if (isTitle) titlePaint else contentPaint
|
val textPaint = if (isTitle) titlePaint else contentPaint
|
||||||
if (!(isTitle && ReadBookConfig.titleMode == 2)) {
|
if (!(isTitle && ReadBookConfig.titleMode == 2)) {
|
||||||
setTypeText(
|
setTypeText(
|
||||||
@ -147,7 +147,7 @@ object ChapterProvider {
|
|||||||
val text = content.substring(start, matcher.start())
|
val text = content.substring(start, matcher.start())
|
||||||
if (text.isNotBlank()) {
|
if (text.isNotBlank()) {
|
||||||
val isTitle = index == 0
|
val isTitle = index == 0
|
||||||
val isVolumeTitle = bookChapter.isVolume && isTitle && bookChapter.url == bookChapter.title
|
val isVolumeTitle = bookChapter.isVolume && isTitle && bookChapter.url == bookChapter.title && bookChapter.tag.isNullOrBlank()
|
||||||
val textPaint = if (isTitle) titlePaint else contentPaint
|
val textPaint = if (isTitle) titlePaint else contentPaint
|
||||||
if (!(isTitle && ReadBookConfig.titleMode == 2)) {
|
if (!(isTitle && ReadBookConfig.titleMode == 2)) {
|
||||||
setTypeText(
|
setTypeText(
|
||||||
@ -169,7 +169,7 @@ object ChapterProvider {
|
|||||||
val text = content.substring(start, content.length)
|
val text = content.substring(start, content.length)
|
||||||
if (text.isNotBlank()) {
|
if (text.isNotBlank()) {
|
||||||
val isTitle = index == 0
|
val isTitle = index == 0
|
||||||
val isVolumeTitle = bookChapter.isVolume && isTitle && bookChapter.url == bookChapter.title
|
val isVolumeTitle = bookChapter.isVolume && isTitle && bookChapter.url == bookChapter.title && bookChapter.tag.isNullOrBlank()
|
||||||
val textPaint = if (isTitle) titlePaint else contentPaint
|
val textPaint = if (isTitle) titlePaint else contentPaint
|
||||||
if (!(isTitle && ReadBookConfig.titleMode == 2)) {
|
if (!(isTitle && ReadBookConfig.titleMode == 2)) {
|
||||||
setTypeText(
|
setTypeText(
|
||||||
@ -579,7 +579,7 @@ object ChapterProvider {
|
|||||||
tPaint.typeface = titleFont
|
tPaint.typeface = titleFont
|
||||||
tPaint.textSize = with(ReadBookConfig) { textSize + titleSize }.sp.toFloat()
|
tPaint.textSize = with(ReadBookConfig) { textSize + titleSize }.sp.toFloat()
|
||||||
tPaint.isAntiAlias = true
|
tPaint.isAntiAlias = true
|
||||||
//to do:卷名的标题排版
|
//正文
|
||||||
val cPaint = TextPaint()
|
val cPaint = TextPaint()
|
||||||
cPaint.color = ReadBookConfig.textColor
|
cPaint.color = ReadBookConfig.textColor
|
||||||
cPaint.letterSpacing = ReadBookConfig.letterSpacing
|
cPaint.letterSpacing = ReadBookConfig.letterSpacing
|
||||||
|
Loading…
Reference in New Issue
Block a user