File tree Expand file tree Collapse file tree
app/src/main/kotlin/features/settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,18 +35,23 @@ internal fun inboundProxySummary(
3535 enableSocks5Proxy : Boolean ,
3636 enableHttpProxy : Boolean ,
3737): String {
38- val enabledInbounds = mutableListOf (
39- stringResource(R .string.settings_inbound_tproxy_port)
40- .formatTemplate(" port" to transparentProxyPort),
41- )
38+ val tproxyPort = stringResource(R .string.settings_inbound_tproxy_port)
39+ .formatTemplate(" port" to transparentProxyPort)
40+ val enabledInbounds = mutableListOf<String >()
4241 if (enableSocks5Proxy) {
4342 enabledInbounds + = stringResource(R .string.settings_socks5_proxy)
4443 }
4544 if (enableHttpProxy) {
4645 enabledInbounds + = stringResource(R .string.settings_http_proxy)
4746 }
48- return stringResource(R .string.settings_inbound_selected)
49- .formatTemplate(" inbounds" to enabledInbounds.joinToString())
47+ if (enabledInbounds.isEmpty()) {
48+ return tproxyPort
49+ }
50+ return listOf (
51+ tproxyPort,
52+ stringResource(R .string.settings_inbound_selected)
53+ .formatTemplate(" inbounds" to enabledInbounds.joinToString()),
54+ ).joinToString()
5055}
5156
5257@Composable
You can’t perform that action at this time.
0 commit comments