mirror of
https://github.com/yggdrasil-network/yggdrasil-android.git
synced 2025-04-28 22:25:09 +03:00
Use peer count to track enabled/connected, remove unused submodule
This commit is contained in:
parent
d1ebc977fd
commit
ca45b37baa
3 changed files with 5 additions and 9 deletions
|
@ -155,11 +155,11 @@ class MainActivity : AppCompatActivity() {
|
|||
"state" -> {
|
||||
enabledLabel.text = if (intent.getBooleanExtra("started", false)) {
|
||||
var count = 0
|
||||
if (intent.hasExtra("tree")) {
|
||||
val tree = intent.getStringExtra("tree")
|
||||
if (tree != null && tree != "null") {
|
||||
val treeState = JSONArray(tree)
|
||||
count = treeState.length()
|
||||
if (intent.hasExtra("peers")) {
|
||||
val peers = intent.getStringExtra("peers")
|
||||
if (peers != null && peers != "null") {
|
||||
val peerState = JSONArray(peers)
|
||||
count = peerState.length()
|
||||
}
|
||||
}
|
||||
if (count == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue