mirror of
https://github.com/yggdrasil-network/crispa-android.git
synced 2024-11-13 22:11:03 +00:00
1. static IP fix
This commit is contained in:
parent
aaf6dc41c8
commit
9306593012
@ -29,7 +29,7 @@ import io.github.chronosx88.yggdrasil.models.config.Utils.Companion.serializePee
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
||||
companion object {
|
||||
const val STATIC_IP = "STATIC_IP"
|
||||
const val STATIC_IP = "STATIC_IP_FLAG"
|
||||
const val signingPrivateKey = "signingPrivateKey"
|
||||
const val signingPublicKey = "signingPublicKey"
|
||||
const val encryptionPrivateKey = "encryptionPrivateKey"
|
||||
@ -89,16 +89,6 @@ class MainActivity : AppCompatActivity() {
|
||||
val staticIP = findViewById<Switch>(R.id.staticIP)
|
||||
staticIP.isChecked =
|
||||
preferences.getString(STATIC_IP, null) != null
|
||||
staticIP.setOnCheckedChangeListener { _, isChecked ->
|
||||
if(isChecked){
|
||||
preferences.edit()
|
||||
.putString(STATIC_IP,STATIC_IP).apply()
|
||||
} else {
|
||||
preferences.edit()
|
||||
.putString(STATIC_IP,null).apply()
|
||||
}
|
||||
}
|
||||
|
||||
val peersListView = findViewById<ListView>(R.id.peers)
|
||||
|
||||
currentPeers = deserializeStringSet2PeerInfoSet(preferences.getStringSet(CURRENT_PEERS, HashSet())!!)
|
||||
|
Loading…
Reference in New Issue
Block a user