|
|
@ -81,6 +81,12 @@ data class BookChapter( |
|
|
|
): String { |
|
|
|
): String { |
|
|
|
var displayTitle = title.replace(AppPattern.rnRegex, "") |
|
|
|
var displayTitle = title.replace(AppPattern.rnRegex, "") |
|
|
|
val mDisplayTitle = displayTitle |
|
|
|
val mDisplayTitle = displayTitle |
|
|
|
|
|
|
|
if (chineseConvert) { |
|
|
|
|
|
|
|
when (AppConfig.chineseConverterType) { |
|
|
|
|
|
|
|
1 -> displayTitle = ChineseUtils.t2s(displayTitle) |
|
|
|
|
|
|
|
2 -> displayTitle = ChineseUtils.s2t(displayTitle) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (useReplace && replaceRules != null) { |
|
|
|
if (useReplace && replaceRules != null) { |
|
|
|
replaceRules.forEach { item -> |
|
|
|
replaceRules.forEach { item -> |
|
|
|
if (item.pattern.isNotEmpty()) { |
|
|
|
if (item.pattern.isNotEmpty()) { |
|
|
@ -97,12 +103,6 @@ data class BookChapter( |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (displayTitle.isBlank()) displayTitle = mDisplayTitle |
|
|
|
if (displayTitle.isBlank()) displayTitle = mDisplayTitle |
|
|
|
if (chineseConvert) { |
|
|
|
|
|
|
|
when (AppConfig.chineseConverterType) { |
|
|
|
|
|
|
|
1 -> displayTitle = ChineseUtils.t2s(displayTitle) |
|
|
|
|
|
|
|
2 -> displayTitle = ChineseUtils.s2t(displayTitle) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return when { |
|
|
|
return when { |
|
|
|
!isVip -> displayTitle |
|
|
|
!isVip -> displayTitle |
|
|
|
isPay -> appCtx.getString(R.string.payed_title, displayTitle) |
|
|
|
isPay -> appCtx.getString(R.string.payed_title, displayTitle) |
|
|
|