SlimeReadTheme: remove use of incompatible API (#6919)
Call requires API level 26 (current min is 21): `java.util.regex.Matcher#start` (called from kotlin. text. `MatchGroupCollection#get(String)`)
This commit is contained in:
parent
0615bf338a
commit
61c8073679
|
@ -56,8 +56,8 @@ abstract class SlimeReadTheme(
|
|||
if (!scriptResponse.isSuccessful) throw Exception("HTTP error ${scriptResponse.code}")
|
||||
val script = scriptResponse.body.string()
|
||||
val apiUrl = FUNCTION_REGEX.find(script)?.let { result ->
|
||||
val varBlock = result.groups["script"]?.value ?: return@let null
|
||||
val varUrlInfix = result.groups["infix"]?.value ?: return@let null
|
||||
val varBlock = result.groupValues[1]
|
||||
val varUrlInfix = result.groupValues[2]
|
||||
|
||||
val block = """${varBlock.replace(varUrlInfix, "\"$urlInfix\"")}.toString()"""
|
||||
|
||||
|
|
Loading…
Reference in New Issue