fix: теперь в карточке натсроек на главной показывается текущий транспорт

This commit is contained in:
samosvalishe committed 2026-04-06 00:21:21 +03:00
1 parent 623af12be8
commit 5b2d9a5778
3 files changed
+4 -3

No files matched your search

@@ -218,7 +218,7 @@ fun ClientSetupScreen(
noDtls = false
},
shape = SegmentedButtonDefaults.itemShape(index = 0, count = 2)
) { Text("TCP") }
) { Text(stringResource(R.string.tcp)) }
SegmentedButton(
selected = useUdp,
onClick = {
@@ -226,7 +226,7 @@ fun ClientSetupScreen(
useUdp = true
},
shape = SegmentedButtonDefaults.itemShape(index = 1, count = 2)
) { Text("UDP") }
) { Text(stringResource(R.string.udp)) }
}
}
@@ -221,7 +221,7 @@ fun HomeScreen(
Spacer(Modifier.height(12.dp))
ConfigRow(stringResource(R.string.server), clientConfig.serverAddress)
ConfigRow(stringResource(R.string.threads), "${clientConfig.threads}")
ConfigRow(stringResource(R.string.udp), if (clientConfig.useUdp) stringResource(R.string.on) else stringResource(R.string.off))
ConfigRow(stringResource(R.string.transport_protocol), if (clientConfig.useUdp) stringResource(R.string.udp) else stringResource(R.string.tcp))
ConfigRow(stringResource(R.string.local_port), clientConfig.localPort)
}
}
+1
View File
@@ -14,6 +14,7 @@
<string name="current_settings">Текущие настройки</string>
<string name="server">Сервер</string>
<string name="threads">Потоки</string>
<string name="tcp">TCP</string>
<string name="udp">UDP</string>
<string name="on">Вкл</string>
<string name="off">Выкл</string>