Fix tor connection when adding a relay just after enabling tor

This commit is contained in:
greenart7c3
2025-02-21 10:16:18 -03:00
parent b91ccf551c
commit d27b950cc7
2 changed files with 4 additions and 0 deletions
@@ -1249,6 +1249,8 @@ fun MainScreen(
.padding(horizontal = verticalPadding)
.padding(top = verticalPadding * 1.5f),
onPost = {
account.useProxy = true
account.proxyPort = it
LocalPreferences.updateProxy(context, true, it)
scope.launch(Dispatchers.IO) {
NotificationDataSource.stopSync()
@@ -397,6 +397,8 @@ fun SettingsScreen(
onClick = {
disconnectTorDialog = false
checked = false
account.proxyPort = proxyPort.value.toInt()
account.useProxy = false
LocalPreferences.updateProxy(context, false, proxyPort.value.toInt())
scope.launch(Dispatchers.IO) {
NotificationDataSource.stopSync()