mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-06 03:18:23 +00:00
Fix tor connection when adding a relay just after enabling tor
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user