only one dns

This commit is contained in:
Finnley Somdahl 2023-12-05 22:40:27 -06:00
parent 55521ab9fc
commit ad1734d640
2 changed files with 1 additions and 47 deletions

View file

@ -338,16 +338,6 @@ class SettingsActivity : AppCompatActivity() {
binding.settingsRecentlyListOnly.setOnCheckedChangeListener { _, isChecked ->
saveData("recently_list_only", isChecked)
}
val dns = listOf("None", "Google", "Cloudflare", "AdGuard")
binding.settingsDns.setText(dns[loadData("settings_dns") ?: 0], false)
binding.settingsDns.setAdapter(ArrayAdapter(this, R.layout.item_dropdown, dns))
binding.settingsDns.setOnItemClickListener { _, _, i, _ ->
saveData("settings_dns", i)
initializeNetwork(this)
binding.settingsDns.clearFocus()
}
binding.settingsPreferDub.isChecked = loadData("settings_prefer_dub") ?: false
binding.settingsPreferDub.setOnCheckedChangeListener { _, isChecked ->
saveData("settings_prefer_dub", isChecked)

View file

@ -706,41 +706,6 @@
android:layout_marginBottom="8dp"
android:background="?android:attr/listDivider" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.58"
android:fontFamily="@font/poppins_bold"
android:text="@string/extension_specific_dns" />
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:boxCornerRadiusBottomEnd="8dp"
app:boxCornerRadiusBottomStart="8dp"
app:boxCornerRadiusTopEnd="8dp"
app:boxCornerRadiusTopStart="8dp"
app:hintAnimationEnabled="true"
app:startIconDrawable="@drawable/ic_round_dns_24">
<AutoCompleteTextView
android:id="@+id/settingsExtensionDns"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fontFamily="@font/poppins_bold"
android:freezesText="false"
android:inputType="none"
android:padding="8dp"
android:text="@string/none"
android:textAllCaps="true"
android:textColor="?android:attr/textColorSecondary"
android:textSize="14sp"
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
</com.google.android.material.textfield.TextInputLayout>
</ani.dantotsu.others.Xpandable>
<ani.dantotsu.others.Xpandable
@ -888,7 +853,7 @@
app:startIconDrawable="@drawable/ic_round_dns_24">
<AutoCompleteTextView
android:id="@+id/settingsDns"
android:id="@+id/settingsExtensionDns"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -903,7 +868,6 @@
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"