mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-09-06 18:01:11 +00:00
Do not show extended proxy details in App Settings if proxy type is system or none (#661)
Fixes: #660
This commit is contained in:
parent
5921fb2bb6
commit
014c94a031
|
@ -284,6 +284,7 @@ class AppSettingsActivity: AppCompatActivity() {
|
|||
onDismiss = { showProxyTypeInputDialog = false }
|
||||
)
|
||||
|
||||
if (proxyType !in listOf(Settings.PROXY_TYPE_SYSTEM, Settings.PROXY_TYPE_NONE)) {
|
||||
var showProxyHostNameInputDialog by remember { mutableStateOf(false) }
|
||||
Setting(
|
||||
name = stringResource(R.string.app_settings_proxy_host),
|
||||
|
@ -317,13 +318,14 @@ class AppSettingsActivity: AppCompatActivity() {
|
|||
val newPort = it.toInt()
|
||||
if (newPort in 1..65535)
|
||||
onProxyPortUpdated(newPort)
|
||||
} catch(_: NumberFormatException) {
|
||||
} catch (_: NumberFormatException) {
|
||||
// user entered invalid port number
|
||||
}
|
||||
},
|
||||
onDismiss = { showProxyPortInputDialog = false }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
@Preview
|
||||
|
|
Loading…
Reference in a new issue