mirror of
https://github.com/kalarina-bit/Sparkledns.git
synced 2026-11-22 15:46:09 +00:00
Use the built-in server list directly
This commit is contained in:
@@ -45,12 +45,10 @@ object Providers {
|
||||
),
|
||||
)
|
||||
|
||||
val list: List<DohProvider> get() = builtIn
|
||||
|
||||
// The project's own server stays the default whatever order the list uses
|
||||
val default: DohProvider get() = list.firstOrNull { it.id == DEFAULT_ID } ?: list.first()
|
||||
val default: DohProvider = builtIn.firstOrNull { it.id == DEFAULT_ID } ?: builtIn.first()
|
||||
|
||||
fun byId(id: String): DohProvider = list.firstOrNull { it.id == id } ?: default
|
||||
fun byId(id: String): DohProvider = builtIn.firstOrNull { it.id == id } ?: default
|
||||
}
|
||||
|
||||
fun parseIps(raw: String): List<String> =
|
||||
|
||||
@@ -122,7 +122,7 @@ fun SettingsScreen(
|
||||
|
||||
SectionLabel(stringResource(R.string.servers), Modifier.padding(top = 8.dp))
|
||||
Column(Modifier.fillMaxWidth().appCard()) {
|
||||
Providers.list.forEachIndexed { index, provider ->
|
||||
Providers.builtIn.forEachIndexed { index, provider ->
|
||||
if (index > 0) ListDivider()
|
||||
ServerRow(
|
||||
title = provider.name,
|
||||
|
||||
Reference in New Issue
Block a user