Improve tags highlighter
This commit is contained in:
@@ -13,7 +13,13 @@ class MangaTagHighlighter @Inject constructor(
|
||||
@ApplicationContext context: Context,
|
||||
) {
|
||||
|
||||
private val dict = context.resources.getStringArray(R.array.genres_warnlist).toSet()
|
||||
private val dict by lazy {
|
||||
context.resources.openRawResource(R.raw.tags_redlist).use {
|
||||
val set = HashSet<String>()
|
||||
it.bufferedReader().forEachLine { x -> set.add(x) }
|
||||
set
|
||||
}
|
||||
}
|
||||
|
||||
@ColorRes
|
||||
fun getTint(tag: MangaTag): Int {
|
||||
|
||||
20
app/src/main/res/raw/tags_redlist
Normal file
20
app/src/main/res/raw/tags_redlist
Normal file
@@ -0,0 +1,20 @@
|
||||
yaoi
|
||||
yaoi(bl)
|
||||
yuri
|
||||
trap
|
||||
traps
|
||||
guro
|
||||
furry
|
||||
loli
|
||||
incest
|
||||
tentacles
|
||||
shemale
|
||||
scat
|
||||
яой
|
||||
юри
|
||||
трап
|
||||
копро
|
||||
гуро
|
||||
тентакли
|
||||
футанари
|
||||
инцест
|
||||
@@ -46,10 +46,4 @@
|
||||
<item>2</item>
|
||||
<item>0</item>
|
||||
</string-array>
|
||||
<string-array name="genres_warnlist" translatable="false">
|
||||
<item>yaoi</item>
|
||||
<item>яой</item>
|
||||
<item>yuri</item>
|
||||
<item>юри</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user