SVG Continents

This commit is contained in:
soraefir
2024-04-11 22:17:28 +02:00
parent a8cf82565d
commit 9f5018c2ee
10 changed files with 17155 additions and 16706 deletions

View File

@@ -39,17 +39,20 @@ class CSSWrapper(private val ctx: Context) {
private fun refresh() {
val id = if (Settings.isRegional(ctx)) "1" else "2"
customCSS = visits.getVisitedByValue().map { (k, v) ->
if (groups.getGroupFromKey(k).key != NO_GROUP || (!Settings.isRegional(ctx) && k == AUTO_GROUP)) {
v.joinToString(",") { "#${it}$id,#${it}" } + "{fill:${
colorToHex6(
if (k == AUTO_GROUP)
colorWrapper(ctx, android.R.attr.colorPrimary)
else groups.getGroupFromKey(k).color
)
};}"
(if (groups.getGroupFromKey(k).key != NO_GROUP) {
v
} else if (!Settings.isRegional(ctx) && k == AUTO_GROUP) {
v.filter { it !in World.WWW.children.map { it1 -> it1.code } }
} else {
""
}
emptyList()
}).takeIf { it.isNotEmpty() }
?.joinToString(",") { "#${it}$id,#${it}" } + "{fill:${
colorToHex6(
if (k == AUTO_GROUP)
colorWrapper(ctx, android.R.attr.colorPrimary)
else groups.getGroupFromKey(k).color
)
};}"
}.joinToString("")
}