Update FontsModule.kt

This commit is contained in:
OTKUSteyler 2026-09-09 19:52:56 +02:00 • committed by GitHub
parent cd418c2d79
commit 64f83dcd5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,7 +32,7 @@ data class FontDefinition(
/**
* Custom font loading + ReactFontManager hijack.
*/
val fonts by goonXposedTweak {
val fonts by GoonXposedTweak {
val log: Logger = this.log
GoonXposedPayloadBuilder.contribute { put("fontPatch", 2) }
@ -94,7 +94,7 @@ val fonts by goonXposedTweak {
val ext = FontsState.FILE_EXTENSIONS.firstOrNull { url.endsWith(it) } ?: ".ttf"
val file = File(setDir, "$name$ext").apply { ensureFile() }
if (file.exists()) return@async
val response: HttpResponse = goonXposedClient.get(url)
val response: HttpResponse = GoonXposedClient.get(url)
if (response.status == HttpStatusCode.OK) {
file.writeBytes(response.body())
}