[RU]Remanga chapters paid indication (#13307)

This commit is contained in:
Yjin 2022-09-02 01:15:31 +05:00 committed by GitHub
parent 75605af7a9
commit f2a3dae4aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Remanga'
pkgNameSuffix = 'ru.remanga'
extClass = '.Remanga'
extVersionCode = 53
extVersionCode = 54
}
dependencies {

View File

@ -373,6 +373,8 @@ class Remanga : ConfigurableSource, HttpSource() {
@SuppressLint("DefaultLocale")
private fun chapterName(book: BookDto): String {
var chapterName = "${book.tome}. Глава ${book.chapter}"
if (book.is_paid and (book.is_bought != true))
chapterName += " \uD83D\uDCB2 "
if (book.name.isNotBlank()) {
chapterName += " ${book.name.capitalize()}"
}
@ -708,7 +710,7 @@ class Remanga : ConfigurableSource, HttpSource() {
val paidChapterShow = androidx.preference.CheckBoxPreference(screen.context).apply {
key = PAID_PREF
title = PAID_PREF_Title
summary = "Показывает не купленные главы(может вызвать ошибки при обновлении/автозагрузке)"
summary = "Показывает не купленные\uD83D\uDCB2 главы(может вызвать ошибки при обновлении/автозагрузке)"
setDefaultValue(false)
setOnPreferenceChangeListener { _, newValue ->