Skip to content

Commit ea4630f

Browse files
committed
fix equicord updating
1 parent 6ad5ed2 commit ea4630f

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

app/src/main/java/com/nin0dev/vendroid/webview/HttpClient.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ object HttpClient {
5050
}
5151

5252
@Throws(IOException::class)
53-
fun fetch(url: String): HttpURLConnection {
53+
fun fetch(url: String?): HttpURLConnection {
5454
val conn = URL(url).openConnection() as HttpURLConnection
5555
if (conn.getResponseCode() >= 300) {
5656
throw HttpException(conn)

app/src/main/java/com/nin0dev/vendroid/webview/VencordNative.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ class VencordNative(private val activity: MainActivity, private val wv: WebView)
2727
fun updateVencord() {
2828
val sPrefs = activity.getSharedPreferences("settings", Context.MODE_PRIVATE)
2929
val vendroidFile = File(activity.filesDir, "vencord.js")
30-
val conn = HttpClient.fetch(sPrefs.getString("vencordLocation", if(sPrefs.getBoolean("equicord", false)) Constants.EQUICORD_BUNDLE_URL else Constants.JS_BUNDLE_URL)!!)
30+
val conn = HttpClient.fetch(
31+
sPrefs.getString(
32+
"vencordLocation",
33+
if (
34+
sPrefs.getString("clientMod", "vencord") == "equicord"
35+
) Constants.EQUICORD_BUNDLE_URL else Constants.JS_BUNDLE_URL
36+
)
37+
)
3138
vendroidFile.writeText(HttpClient.readAsText(conn.inputStream))
3239
activity.showDiscordToast("Updated Vencord, restart to apply changes!", "SUCCESS")
3340
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)