Skip to content

Commit

Permalink
no images found to replace, replaced some/all frontend branding
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabe-W-J committed Oct 9, 2024
1 parent 72af6df commit 6bab1f2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ plugins {
}

android {
namespace = "io.github.pyoncord.xposed"
namespace = "io.github.revenge.xposed"
compileSdk = 33

defaultConfig {
applicationId = "io.github.pyoncord.xposed"
applicationId = "io.github.revenge.xposed"
minSdk = 24
targetSdk = 33
versionCode = 203
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:value="true" />
<meta-data
android:name="xposeddescription"
android:value="An Xposed module to inject Bunny, a mod for Discord's mobile apps." />
android:value="An Xposed module to inject Revenge, a mod for Discord's mobile apps." />
<meta-data
android:name="xposedminversion"
android:value="82" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/xposed_init
Original file line number Diff line number Diff line change
@@ -1 +1 @@
io.github.pyoncord.xposed.Main
io.github.revenge.xposed.Main
8 changes: 4 additions & 4 deletions app/src/main/kotlin/io/github/pyoncord/xposed/FontsModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class FontsModule: PyonModule() {
if (!fileName.startsWith(".")) {
val fontName = fileName.split('.')[0]
if (fontDef.main.keys.none { it == fontName }) {
Log.i("Bunny", "Deleting font file: $fileName")
Log.i("Revenge", "Deleting font file: $fileName")
file.delete()
}
}
Expand All @@ -97,12 +97,12 @@ class FontsModule: PyonModule() {
async {
val url = fontDef.main.getValue(name)
try {
Log.i("Bunny", "Downloading $name from $url")
Log.i("Revenge", "Downloading $name from $url")
val file = File(fontsDir, "$name${FILE_EXTENSIONS.first { url.endsWith(it) }}")
if (file.exists()) return@async

val client = HttpClient(CIO) {
install(UserAgent) { agent = "BunnyXposed" }
install(UserAgent) { agent = "RevengeXposed" }
}

val response: HttpResponse = client.get(url)
Expand All @@ -113,7 +113,7 @@ class FontsModule: PyonModule() {

return@async
} catch (e: Throwable) {
Log.e("Bunny", "Failed to download fonts ($name from $url)", e)
Log.e("Revenge", "Failed to download fonts ($name from $url)", e)
}
}
}.awaitAll()
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/kotlin/io/github/pyoncord/xposed/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ class Main : IXposedHookLoadPackage {
install(HttpTimeout) {
requestTimeoutMillis = if (bundle.exists()) 3000 else 10000
}
install(UserAgent) { agent = "BunnyXposed" }
install(UserAgent) { agent = "RevengeXposed" }
}

val url =
if (config.customLoadUrl.enabled) config.customLoadUrl.url
else "https://github.com/revenge-mod/Revenge/releases/latest/download/revenge.js"

Log.e("Bunny", "Fetching JS bundle from $url")
Log.e("Revenge", "Fetching JS bundle from $url")

val response: HttpResponse = client.get(url) {
headers {
Expand All @@ -153,13 +153,14 @@ class Main : IXposedHookLoadPackage {
return@async
} catch (e: RedirectResponseException) {
if (e.response.status != HttpStatusCode.NotModified) throw e;
Log.e("Bunny", "Server reponded with status code 304 - no changes to file")
Log.e("Revenge", "Server reponded with status code 304 - no changes to file")
} catch (e: Throwable) {
// activity.runOnUiThread {
// Toast.makeText(activity.applicationContext, "Failed to fetch JS bundle, Bunny may not load!", Toast.LENGTH_SHORT).show()
// Toast.makeText(activity.applicationContext, "Failed to fetch JS bundle, Revenge may not load!", Toast.LENGTH_SHORT).show()
// }
// so are we just removing the toast entirely or, cos like commented code without explanation isnt the best

Log.e("Bunny", "Failed to download bundle", e)
Log.e("Revenge", "Failed to download bundle", e)
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">BunnyXposed</string>
<string name="app_name">RevengeXposed</string>
</resources>
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rootProject.name = "BunnyXposed"
rootProject.name = "RevengeXposed"
include(":app")

0 comments on commit 6bab1f2

Please sign in to comment.