Skip to content
Merged

Dev #124

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.nin0dev.vendroid"
minSdk 25
targetSdk 34
versionCode 12
versionName "1.9"
versionCode 13
versionName "1.10"
}

buildTypes {
Expand Down Expand Up @@ -40,6 +40,5 @@ dependencies {
implementation 'com.google.code.gson:gson:2.12.1'
implementation 'com.android.volley:volley:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation 'com.google.firebase:firebase-common-ktx:21.0.0'
}

5 changes: 0 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,12 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:targetApi="34">
<activity
android:name=".RecoveryActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/AppTheme" />
<activity
android:name=".WelcomeActivity"
android:exported="false"
android:theme="@style/AppTheme" />
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize|layoutDirection"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ object HttpClient {
}

@Throws(IOException::class)
fun fetch(url: String): HttpURLConnection {
fun fetch(url: String?): HttpURLConnection {
val conn = URL(url).openConnection() as HttpURLConnection
if (conn.getResponseCode() >= 300) {
throw HttpException(conn)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ class VencordNative(private val activity: MainActivity, private val wv: WebView)
fun updateVencord() {
val sPrefs = activity.getSharedPreferences("settings", Context.MODE_PRIVATE)
val vendroidFile = File(activity.filesDir, "vencord.js")
val conn = HttpClient.fetch(sPrefs.getString("vencordLocation", if(sPrefs.getBoolean("equicord", false)) Constants.EQUICORD_BUNDLE_URL else Constants.JS_BUNDLE_URL)!!)
val conn = HttpClient.fetch(
sPrefs.getString(
"vencordLocation",
if (
sPrefs.getString("clientMod", "vencord") == "equicord"
) Constants.EQUICORD_BUNDLE_URL else Constants.JS_BUNDLE_URL
)
)
vendroidFile.writeText(HttpClient.readAsText(conn.inputStream))
activity.showDiscordToast("Updated Vencord, restart to apply changes!", "SUCCESS")
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.8.1' apply false
id 'com.android.library' version '8.8.1' apply false
id 'com.android.application' version '8.12.2' apply false
id 'com.android.library' version '8.12.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.25' apply false
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading