mirror of
https://github.com/yggdrasil-network/crispa-android.git
synced 2025-01-22 07:56:30 +00:00
1. add DNS layout fix
This commit is contained in:
parent
f5fcd68984
commit
0fb8ed0252
@ -107,7 +107,7 @@ class DNSListActivity : AppCompatActivity() {
|
|||||||
var ccpInput = view.findViewById<com.hbb20.CountryCodePicker>(R.id.ccp)
|
var ccpInput = view.findViewById<com.hbb20.CountryCodePicker>(R.id.ccp)
|
||||||
var ip = ipInput.text.toString().toLowerCase()
|
var ip = ipInput.text.toString().toLowerCase()
|
||||||
var ccp = ccpInput.selectedCountryNameCode
|
var ccp = ccpInput.selectedCountryNameCode
|
||||||
GlobalScope.launch {
|
thread(start = true) {
|
||||||
var di = DNSInfo(InetAddress.getByName("["+ip+"]"), ccp, "User DNS")
|
var di = DNSInfo(InetAddress.getByName("["+ip+"]"), ccp, "User DNS")
|
||||||
try {
|
try {
|
||||||
var ping = ping(di.address, 53)
|
var ping = ping(di.address, 53)
|
||||||
@ -115,8 +115,8 @@ class DNSListActivity : AppCompatActivity() {
|
|||||||
} catch(e: Throwable){
|
} catch(e: Throwable){
|
||||||
di.ping = Int.MAX_VALUE
|
di.ping = Int.MAX_VALUE
|
||||||
}
|
}
|
||||||
withContext(Dispatchers.Main) {
|
runOnUiThread {
|
||||||
var selectAdapter = (findViewById<ListView>(R.id.peerList).adapter as SelectDNSInfoListAdapter)
|
var selectAdapter = (findViewById<ListView>(R.id.dnsList).adapter as SelectDNSInfoListAdapter)
|
||||||
selectAdapter.addItem(0, di)
|
selectAdapter.addItem(0, di)
|
||||||
selectAdapter.notifyDataSetChanged()
|
selectAdapter.notifyDataSetChanged()
|
||||||
ad.dismiss()
|
ad.dismiss()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user