mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-22 13:52:26 +00:00
0.5.6: More bug fixes for built-in Tor stuff.
This commit is contained in:
parent
19544c1b3d
commit
ae4e7cb65c
4 changed files with 9 additions and 16 deletions
|
@ -10,8 +10,8 @@ android {
|
|||
applicationId "net.mynero.wallet"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 34
|
||||
versionCode 50500
|
||||
versionName "0.5.5 'Fluorine Fermi'"
|
||||
versionCode 50600
|
||||
versionName "0.5.6 'Fluorine Fermi'"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
|
|
|
@ -26,6 +26,7 @@ import net.mynero.wallet.adapter.TransactionInfoAdapter
|
|||
import net.mynero.wallet.adapter.TransactionInfoAdapter.TxInfoAdapterListener
|
||||
import net.mynero.wallet.model.EnumTorState
|
||||
import net.mynero.wallet.model.TransactionInfo
|
||||
import net.mynero.wallet.model.Wallet
|
||||
import net.mynero.wallet.model.WalletManager
|
||||
import net.mynero.wallet.service.BalanceService
|
||||
import net.mynero.wallet.service.BlockchainService
|
||||
|
@ -181,7 +182,9 @@ class HomeFragment : Fragment(), TxInfoAdapterListener {
|
|||
val proxyString = socketAddress.toString().substring(1)
|
||||
val address = proxyString.split(":")[0]
|
||||
val port = proxyString.split(":")[1]
|
||||
refreshProxy(address, port)
|
||||
|
||||
if(WalletManager.instance?.proxy != proxyString)
|
||||
refreshProxy(address, port)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -157,13 +157,6 @@ class SettingsFragment : Fragment(), PasswordListener, NodeSelectionDialogListen
|
|||
torSwitch?.setOnCheckedChangeListener { _: CompoundButton?, b: Boolean ->
|
||||
mViewModel?.setUseProxy(b)
|
||||
}
|
||||
|
||||
walletProxyPortEditText?.addTextChangedListener {
|
||||
mViewModel?.edited = true
|
||||
}
|
||||
walletProxyAddressEditText?.addTextChangedListener {
|
||||
mViewModel?.edited = true
|
||||
}
|
||||
}
|
||||
|
||||
private fun bindObservers() {
|
||||
|
@ -228,8 +221,10 @@ class SettingsFragment : Fragment(), PasswordListener, NodeSelectionDialogListen
|
|||
private fun refreshProxy() {
|
||||
val proxyAddress = walletProxyAddressEditText?.text.toString()
|
||||
val proxyPort = walletProxyPortEditText?.text.toString()
|
||||
val savedProxyAddress = ProxyService.instance?.proxyAddress
|
||||
val savedProxyPort = ProxyService.instance?.proxyPort
|
||||
|
||||
if(mViewModel?.edited == true)
|
||||
if(proxyAddress != savedProxyAddress || proxyPort != savedProxyPort)
|
||||
ProxyService.instance?.updateProxy(proxyAddress, proxyPort)
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ class SettingsViewModel : ViewModel() {
|
|||
val useProxy: LiveData<Boolean> = _useProxy
|
||||
private val _useBundledTor = MutableLiveData(false)
|
||||
val useBundledTor: LiveData<Boolean> = _useBundledTor
|
||||
var edited = false
|
||||
|
||||
init {
|
||||
_useProxy.value = ProxyService.instance?.usingProxy
|
||||
|
@ -32,8 +31,6 @@ class SettingsViewModel : ViewModel() {
|
|||
} else {
|
||||
samouraiTorManager?.stop()
|
||||
}
|
||||
|
||||
edited = true
|
||||
}
|
||||
|
||||
fun setUseBundledTor(use: Boolean) {
|
||||
|
@ -46,7 +43,5 @@ class SettingsViewModel : ViewModel() {
|
|||
} else {
|
||||
samouraiTorManager?.stop()
|
||||
}
|
||||
|
||||
edited = true
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue