mirror of
https://github.com/yggdrasil-network/crispa-android.git
synced 2025-01-22 16:06:30 +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() {
|
class MainActivity : AppCompatActivity() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val STATIC_IP = "STATIC_IP"
|
const val STATIC_IP = "STATIC_IP_FLAG"
|
||||||
const val signingPrivateKey = "signingPrivateKey"
|
const val signingPrivateKey = "signingPrivateKey"
|
||||||
const val signingPublicKey = "signingPublicKey"
|
const val signingPublicKey = "signingPublicKey"
|
||||||
const val encryptionPrivateKey = "encryptionPrivateKey"
|
const val encryptionPrivateKey = "encryptionPrivateKey"
|
||||||
@ -89,16 +89,6 @@ class MainActivity : AppCompatActivity() {
|
|||||||
val staticIP = findViewById<Switch>(R.id.staticIP)
|
val staticIP = findViewById<Switch>(R.id.staticIP)
|
||||||
staticIP.isChecked =
|
staticIP.isChecked =
|
||||||
preferences.getString(STATIC_IP, null) != null
|
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)
|
val peersListView = findViewById<ListView>(R.id.peers)
|
||||||
|
|
||||||
currentPeers = deserializeStringSet2PeerInfoSet(preferences.getStringSet(CURRENT_PEERS, HashSet())!!)
|
currentPeers = deserializeStringSet2PeerInfoSet(preferences.getStringSet(CURRENT_PEERS, HashSet())!!)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user