Skip to content

Commit

Permalink
Use peer count to track enabled/connected, remove unused submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
neilalexander committed May 31, 2024
1 parent d1ebc97 commit ca45b37
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "libs/yggdrasil-go"]
path = libs/yggdrasil-go
url = https://github.com/yggdrasil-network/yggdrasil-go
10 changes: 5 additions & 5 deletions app/src/main/java/eu/neilalexander/yggdrasil/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion libs/yggdrasil-go
Submodule yggdrasil-go deleted from 6b6cd0

0 comments on commit ca45b37

Please sign in to comment.