chore: почистить мёртвый код по итогам аудита IDE

Удалены неиспользуемые импорты, строки (parameters_title, common_yes/no),
функция startServerFromPrefs и параметр state у HeroToggleButton.
Снят лишний suspend с WireGuardTunnelManager.stop.
This commit is contained in:
samosvalishe committed 2026-06-13 15:25:34 +03:00
1 parent d30906acc3
commit 7390174fdd
6 files changed
+1 -21

No files matched your search

@@ -38,17 +38,4 @@ class ProxyOrchestrator(
proxyManager.startProxy(prefs.clientConfigFlow.first())
}
suspend fun startServerFromPrefs() {
val l = prefs.proxyListenFlow.first()
val c = prefs.proxyConnectFlow.first()
val tcpMode = prefs.clientConfigFlow.first().tcpForward
val opts = prefs.serverOptsFlow.first()
sshRepository.startServer(
listen = l, connect = c,
tcpMode = tcpMode,
obfProfile = if (opts.obfEnabled) opts.obfProfile else "none",
obfKey = if (opts.obfEnabled) opts.obfKey else "",
clientId = prefs.ownClientId()
)
}
}
@@ -53,7 +53,7 @@ class WireGuardTunnelManager(context: Context) {
ProxyServiceState.addLog("WireGuard: туннель $name поднят через $endpoint")
}
suspend fun stop() {
fun stop() {
val tunnel = tunnelRef.getAndSet(null) ?: return
try {
backend.setState(tunnel, Tunnel.State.DOWN, null)
@@ -2,7 +2,6 @@ package com.freeturn.app.ui.screens.clientsetup
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material3.Slider
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
@@ -89,7 +89,6 @@ internal fun ConnectionHero(
horizontalAlignment = Alignment.CenterHorizontally
) {
HeroToggleButton(
state = state,
kind = kind,
reducedMotion = reducedMotion,
onClick = onToggle
@@ -121,7 +120,6 @@ private fun ProxyState.heroKind(): HeroKind = when (this) {
@Composable
private fun HeroToggleButton(
state: ProxyState,
kind: HeroKind,
reducedMotion: Boolean,
onClick: () -> Unit
@@ -36,7 +36,6 @@ import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
-3
View File
@@ -194,7 +194,6 @@
<string name="local_listen_address">Локальный адрес прослушивания</string>
<string name="local_listen_placeholder">127.0.0.1:9000</string>
<string name="local_listen_support">Адрес, на котором клиент принимает трафик от WireGuard/XRay</string>
<string name="parameters_title">Параметры</string>
<string name="client_section_performance">Производительность</string>
<string name="client_section_dns">DNS</string>
<string name="client_section_advanced">Дополнительно</string>
@@ -376,8 +375,6 @@
<string name="nerd_launch_params">Параметры запуска</string>
<string name="nerd_launch_server">Сервер</string>
<string name="nerd_launch_client">Клиент</string>
<string name="common_yes">Да</string>
<string name="common_no">Нет</string>
<string name="open_logs">Открыть логи</string>
<!-- Настройки (новый раздел) -->