mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 16:14:40 +00:00
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).
This commit is contained in:
@@ -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<com.vitorpamplona.amethyst.commons.tor.TorType>,
|
||||
externalPortFlow: kotlinx.coroutines.flow.MutableStateFlow<Int>,
|
||||
initialTorSettings: com.vitorpamplona.amethyst.commons.tor.TorSettings,
|
||||
|
||||
Reference in New Issue
Block a user