mirror of
https://github.com/yggdrasil-network/crispa-android.git
synced 2025-01-22 16:06:30 +00:00
1. fixed dynamic peers list crash
This commit is contained in:
parent
9306593012
commit
04f2537145
@ -71,10 +71,10 @@ class DNSListActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
var ping = ping(dns.address, 53)
|
var ping = ping(dns.address, 53)
|
||||||
dns.ping = ping
|
dns.ping = ping
|
||||||
adapter.addItem(dns)
|
|
||||||
runOnUiThread(
|
runOnUiThread(
|
||||||
Runnable
|
Runnable
|
||||||
{
|
{
|
||||||
|
adapter.addItem(dns)
|
||||||
adapter.sort()
|
adapter.sort()
|
||||||
isLoading = false
|
isLoading = false
|
||||||
}
|
}
|
||||||
|
@ -93,9 +93,9 @@ class PeerListActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
var ping = ping(address, url.port)
|
var ping = ping(address, url.port)
|
||||||
peerInfo.ping = ping
|
peerInfo.ping = ping
|
||||||
adapter.addItem(peerInfo)
|
withContext(Dispatchers.Main) {
|
||||||
if(adapter.count % 5 == 0) {
|
adapter.addItem(peerInfo)
|
||||||
withContext(Dispatchers.Main) {
|
if(adapter.count % 5 == 0) {
|
||||||
adapter.sort()
|
adapter.sort()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user