From d2d044a634afb04319029fefa7c8c2c3ebfc3158 Mon Sep 17 00:00:00 2001 From: nrobi144 Date: Thu, 18 Jun 2026 11:13:54 +0300 Subject: [PATCH] refactor(desktop): relax App() torManager param to ITorManager interface App() only consumes torManager.status, which is on ITorManager. Loosening the parameter type lets future tests substitute a fake without having to construct the concrete DesktopTorManager (which eagerly builds a kmp-tor TorRuntime on first status access). No production behavior change: DesktopTorManager already implements ITorManager and the existing call site at Main.kt:633 upcasts naturally. This is a small intermediate step on the road to the still-pending Phase 1.4 App() Compose smoke test, which is the last item blocked on broader App() dependency injection (relayManager / localCache / localRelayStore are still remember'd internally). --- .../jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/Main.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/Main.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/Main.kt index 0a00e371ae..4033bebe02 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/Main.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/Main.kt @@ -662,7 +662,7 @@ fun App( onShowImportFollowListDialog: () -> Unit = {}, onDismissImportFollowListDialog: () -> Unit = {}, onRestartApp: () -> Unit = {}, - torManager: com.vitorpamplona.amethyst.desktop.tor.DesktopTorManager, + torManager: com.vitorpamplona.amethyst.commons.tor.ITorManager, torTypeFlow: kotlinx.coroutines.flow.MutableStateFlow, externalPortFlow: kotlinx.coroutines.flow.MutableStateFlow, initialTorSettings: com.vitorpamplona.amethyst.commons.tor.TorSettings,