File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
app/src/main/java/com/nin0dev/vendroid Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,12 @@ class MainActivity : Activity() {
135135 val editor = sPrefs.edit()
136136
137137 // https://developer.chrome.com/docs/devtools/remote-debugging/webviews/
138- WebView .setWebContentsDebuggingEnabled(BuildConfig .DEBUG )
138+ WebView .setWebContentsDebuggingEnabled(
139+ BuildConfig .DEBUG || sPrefs.getBoolean(
140+ " allowRemoteDebugging" ,
141+ false
142+ )
143+ )
139144 setContentView(R .layout.activity_main)
140145
141146 findViewById<GifImageView >(
@@ -163,7 +168,7 @@ class MainActivity : Activity() {
163168 wv?.addJavascriptInterface(VencordNative (this , wv!! ), " VencordMobileNative" )
164169 try {
165170 fetchVencord(this )
166- } catch (ex : IOException ) {
171+ } catch (_ : IOException ) {
167172
168173 }
169174 } else {
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ object HttpClient {
2525 val sPrefs = activity.getSharedPreferences(" settings" , Context .MODE_PRIVATE )
2626 val e = sPrefs.edit()
2727 val bundleURLToUse = if (sPrefs.getString(" clientMod" , " vencord" ) == " equicord" ) Constants .EQUICORD_BUNDLE_URL else Constants .JS_BUNDLE_URL
28- var vendroidFile = File (activity.filesDir, " vencord.js" )
28+ val vendroidFile = File (activity.filesDir, " vencord.js" )
2929 val res = activity.resources
3030 res.openRawResource(R .raw.vencord_mobile).use { `is ` -> VencordMobileRuntime = readAsText(`is `) }
3131 if (VencordRuntime != null ) return
You can’t perform that action at this time.
0 commit comments