File tree Expand file tree Collapse file tree 5 files changed +50
-1
lines changed
java/com/nin0dev/vendroid Expand file tree Collapse file tree 5 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 22
33An actively maintained fork of Vendroid, a Discord client that loads the mobile website and injects Vencord.
44
5- [ website] ( https://vendroid.nin0.dev ) · [ download] ( https://vendroid.nin0.dev/download ) · [ faq] ( https://vendroid.nin0.dev/faq ) · [ support] ( https://discord.gg/qtmpcF56Yf )
5+ [ website] ( https://vendroid.nin0.dev ) · [ download] ( https://vendroid.nin0.dev/download ) · [ faq] ( https://vendroid.nin0.dev/faq ) · [ support] ( https://discord.gg/6ckFahqUcd )
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import com.nin0dev.vendroid.webview.VChromeClient
3232import com.nin0dev.vendroid.webview.VWebviewClient
3333import com.nin0dev.vendroid.webview.VencordNative
3434import pl.droidsonroids.gif.GifImageView
35+ import java.io.File
3536import java.io.IOException
3637
3738
@@ -193,6 +194,15 @@ class MainActivity : Activity() {
193194 s.domStorageEnabled = true
194195 s.allowFileAccess = true
195196
197+ if (sPrefs.getBoolean(" clearBundle" , false )) {
198+ File (filesDir, " vencord.js" ).delete()
199+ editor.putString(" vencordLocation" , null )
200+ editor.putBoolean(" clearBundle" , false )
201+ editor.apply ()
202+ Toast .makeText(this , " Custom Vencord bundle cleared" , Toast .LENGTH_SHORT )
203+ .show()
204+ }
205+
196206 if (! sPrefs.getBoolean(" safeMode" , false )) {
197207 wv?.addJavascriptInterface(VencordNative (this , wv!! ), " VencordMobileNative" )
198208 try {
Original file line number Diff line number Diff line change @@ -40,6 +40,14 @@ class RecoveryActivity : AppCompatActivity() {
4040 startActivity(Intent (this , MainActivity ::class .java))
4141 }
4242
43+ findViewById<MaterialCardView >(R .id.clear_bundle).setOnClickListener {
44+ val sPrefs = getSharedPreferences(" settings" , Context .MODE_PRIVATE )
45+ val e = sPrefs.edit()
46+ e.putBoolean(" clearBundle" , true )
47+ e.apply ()
48+ finish()
49+ startActivity(Intent (this , MainActivity ::class .java))
50+ }
4351 }
4452 override fun onNewIntent (intent : Intent ) {
4553 super .onNewIntent(intent)
Original file line number Diff line number Diff line change 106106 </LinearLayout >
107107 </com .google.android.material.card.MaterialCardView>
108108
109+ <com .google.android.material.card.MaterialCardView
110+ android : id =" @+id/clear_bundle"
111+ android : layout_width =" match_parent"
112+ android : layout_height =" wrap_content"
113+ android : layout_marginTop =" 10dp"
114+ android : clickable =" true" >
115+
116+ <LinearLayout
117+ android : layout_width =" match_parent"
118+ android : layout_height =" match_parent"
119+ android : orientation =" vertical"
120+ android : padding =" 16dp" >
121+
122+ <TextView
123+ android : layout_width =" wrap_content"
124+ android : layout_height =" wrap_content"
125+ android : text =" @string/clear_bundle"
126+ android : textAppearance =" ?attr/textAppearanceTitleMedium" />
127+
128+ <TextView
129+ android : layout_width =" wrap_content"
130+ android : layout_height =" wrap_content"
131+ android : layout_marginTop =" 8dp"
132+ android : text =" @string/clear_bundle_desc"
133+ android : textAppearance =" ?attr/textAppearanceBodyMedium"
134+ android : textColor =" ?android:attr/textColorSecondary" />
135+ </LinearLayout >
136+ </com .google.android.material.card.MaterialCardView>
137+
109138
110139 </LinearLayout >
111140
Original file line number Diff line number Diff line change 4040 <string name =" save_exit" ><![CDATA[ Save & exit]]> </string >
4141 <string name =" force_update" >Force update Vencord</string >
4242 <string name =" force_update_desc" >Start VendroidEnhanced, but force a Vencord update. Useful if you are crashing or similar and cannot access the Updater tab.</string >
43+ <string name =" clear_bundle" >Clear custom bundle</string >
44+ <string name =" clear_bundle_desc" >Clears the custom bundle you have set (if any) and goes back to stock Vencord.</string >
4345</resources >
You can’t perform that action at this time.
0 commit comments