fix: stop Arti when switching to EXTERNAL Tor mode

EXTERNAL means another Tor process (e.g., Orbot) is running on the
device. No reason to keep our internal Arti alive alongside it.

Also removed the fallback that started Arti when the external port
was invalid — if the user chose EXTERNAL with a bad port, Tor should
be off, not silently falling back to internal.

https://claude.ai/code/session_01BApgDd5udqBzMqysSRMpZu
This commit is contained in:
Claude
2026-04-01 13:11:29 +00:00
parent 1c33dde81a
commit 388a02b60c
@@ -68,11 +68,11 @@ class TorManager(
}
TorType.EXTERNAL -> {
service.stop()
if (externalSocksPort > 0) {
emit(TorServiceStatus.Active(externalSocksPort))
} else {
service.start()
emitAll(service.status)
emit(TorServiceStatus.Off)
}
}
}