|
|
@ -44,14 +44,14 @@ class SettingsActivity : AppCompatActivity() { |
|
|
|
btnSetWormhole.setOnClickListener { |
|
|
|
val inputText = findViewById<View>(R.id.wormholeInput) as EditText |
|
|
|
val result = findViewById<View>(R.id.lblCurrentWormhole) as TextView |
|
|
|
val myhushDefaultWormhole : String = "wormhole.hush.is:443" |
|
|
|
val hushDefaultWormhole : String = "wormhole.hush.is:443" |
|
|
|
val customWormhole = inputText.getText().toString() |
|
|
|
|
|
|
|
// set to myhushDefaultWormhole if nothing in EditText (wormholeInput) |
|
|
|
// set to hushDefaultWormhole if nothing in EditText (wormholeInput) |
|
|
|
if (inputText.text.isBlank()) { |
|
|
|
result.text = myhushDefaultWormhole |
|
|
|
Toast.makeText(this, "Defaulting to: " + myhushDefaultWormhole, Toast.LENGTH_SHORT).show() |
|
|
|
DataModel.setWormholeServer(myhushDefaultWormhole) |
|
|
|
result.text = hushDefaultWormhole |
|
|
|
Toast.makeText(this, "Defaulting to: " + hushDefaultWormhole, Toast.LENGTH_SHORT).show() |
|
|
|
DataModel.setWormholeServer(hushDefaultWormhole) |
|
|
|
} else { |
|
|
|
result.text = customWormhole |
|
|
|
Toast.makeText(this, "Wormhole set to: " + customWormhole, Toast.LENGTH_SHORT).show() |
|
|
|