1
0
Fork 0

removed devbuild settings from welcome screen

This commit is contained in:
nin0dev 2024-08-28 10:43:59 -04:00
parent b22c96af7f
commit b3544cdee2
2 changed files with 0 additions and 48 deletions

View file

@ -27,25 +27,6 @@ class WelcomeActivity : AppCompatActivity() {
setContentView(R.layout.activity_welcome) setContentView(R.layout.activity_welcome)
val devbuildCheckbox = findViewById<CheckBox>(R.id.allow_custom_location)
devbuildCheckbox.setOnClickListener {
if (devbuildCheckbox.isChecked) {
MaterialAlertDialogBuilder(this)
.setTitle("Warning")
.setMessage("If you set a custom location, you will be loading and injecting Vencord from a different location. This feature is meant for developers ONLY. Never edit this setting if someone else asked you to, or if you don't know what you're doing! If you do set a custom location, you will not be able to ask for support in the Vencord support channel or in this project's issues. Are you sure you want to continue?")
.setNegativeButton(resources.getString(R.string.no)) { _, _ ->
devbuildCheckbox.isChecked = false
}
.setPositiveButton(resources.getString(R.string.yes)) { _, _ ->
findViewById<EditText>(R.id.custom_location).visibility = VISIBLE
}
.show()
}
else {
findViewById<EditText>(R.id.custom_location).visibility = GONE
}
}
findViewById<ExtendedFloatingActionButton>(R.id.save_settings).setOnClickListener { findViewById<ExtendedFloatingActionButton>(R.id.save_settings).setOnClickListener {
val sPrefs = getSharedPreferences("settings", Context.MODE_PRIVATE) val sPrefs = getSharedPreferences("settings", Context.MODE_PRIVATE)
val editor = sPrefs.edit() val editor = sPrefs.edit()
@ -54,7 +35,6 @@ class WelcomeActivity : AppCompatActivity() {
if (findViewById<RadioButton>(R.id.stable).isChecked) editor.putString("discordBranch", "stable") if (findViewById<RadioButton>(R.id.stable).isChecked) editor.putString("discordBranch", "stable")
if (findViewById<RadioButton>(R.id.ptb).isChecked) editor.putString("discordBranch", "ptb") if (findViewById<RadioButton>(R.id.ptb).isChecked) editor.putString("discordBranch", "ptb")
if (findViewById<RadioButton>(R.id.canary).isChecked) editor.putString("discordBranch", "canary") if (findViewById<RadioButton>(R.id.canary).isChecked) editor.putString("discordBranch", "canary")
if (findViewById<CheckBox>(R.id.allow_custom_location).isChecked && findViewById<EditText>(R.id.custom_location).text.isNotBlank()) editor.putString("vencordLocation", findViewById<EditText>(R.id.custom_location).text.toString())
editor.apply() editor.apply()
finish() finish()

View file

@ -71,34 +71,6 @@
android:text="@string/canary" /> android:text="@string/canary" />
</RadioGroup> </RadioGroup>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/vencord_location"
android:textColor="@color/text"
android:textSize="18sp" />
<CheckBox
android:id="@+id/allow_custom_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/set_custom_location" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:hint="@string/custom_location_url">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>