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 ip = ipInput.text.toString().toLowerCase()
|
||||
var ccp = ccpInput.selectedCountryNameCode
|
||||
GlobalScope.launch {
|
||||
thread(start = true) {
|
||||
var di = DNSInfo(InetAddress.getByName("["+ip+"]"), ccp, "User DNS")
|
||||
try {
|
||||
var ping = ping(di.address, 53)
|
||||
@ -115,8 +115,8 @@ class DNSListActivity : AppCompatActivity() {
|
||||
} catch(e: Throwable){
|
||||
di.ping = Int.MAX_VALUE
|
||||
}
|
||||
withContext(Dispatchers.Main) {
|
||||
var selectAdapter = (findViewById<ListView>(R.id.peerList).adapter as SelectDNSInfoListAdapter)
|
||||
runOnUiThread {
|
||||
var selectAdapter = (findViewById<ListView>(R.id.dnsList).adapter as SelectDNSInfoListAdapter)
|
||||
selectAdapter.addItem(0, di)
|
||||
selectAdapter.notifyDataSetChanged()
|
||||
ad.dismiss()
|
||||
|
Loading…
x
Reference in New Issue
Block a user