[RU]Mangalib option change language in latest (#10144)
* [RU]Mangalib option change language in latest * icon update
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 186 KiB |
|
@ -46,7 +46,7 @@ import java.util.concurrent.TimeUnit
|
||||||
class LibManga : ConfigurableSource, HttpSource() {
|
class LibManga : ConfigurableSource, HttpSource() {
|
||||||
|
|
||||||
private val json: Json by injectLazy()
|
private val json: Json by injectLazy()
|
||||||
|
|
||||||
private val preferences: SharedPreferences by lazy {
|
private val preferences: SharedPreferences by lazy {
|
||||||
Injekt.get<Application>().getSharedPreferences("source_${id}_2", 0x0000)
|
Injekt.get<Application>().getSharedPreferences("source_${id}_2", 0x0000)
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ class LibManga : ConfigurableSource, HttpSource() {
|
||||||
|
|
||||||
element.select("a").first().let { link ->
|
element.select("a").first().let { link ->
|
||||||
manga.setUrlWithoutDomain(link.attr("href"))
|
manga.setUrlWithoutDomain(link.attr("href"))
|
||||||
manga.title = if (element.select(".updates__name_rus").isNullOrEmpty()) { element.select("h4").first().text() } else element.select(".updates__name_rus").first().text()
|
manga.title = if (titleLanguage.equals("rus") || element.select(".updates__name_rus").isNullOrEmpty()) { element.select("h4").first().text() } else element.select(".updates__name_rus").first().text()
|
||||||
}
|
}
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
@ -840,7 +840,7 @@ class LibManga : ConfigurableSource, HttpSource() {
|
||||||
val titleLanguagePref = ListPreference(screen.context).apply {
|
val titleLanguagePref = ListPreference(screen.context).apply {
|
||||||
key = LANGUAGE_PREF
|
key = LANGUAGE_PREF
|
||||||
title = LANGUAGE_PREF_Title
|
title = LANGUAGE_PREF_Title
|
||||||
entries = arrayOf("Транскрипция и английский", "Русский")
|
entries = arrayOf("Английский (транскрипция)", "Русский")
|
||||||
entryValues = arrayOf("eng", "rus")
|
entryValues = arrayOf("eng", "rus")
|
||||||
summary = "%s"
|
summary = "%s"
|
||||||
setDefaultValue("eng")
|
setDefaultValue("eng")
|
||||||
|
|