From e732c1bc2d1d96297a792b3c0d591f56697ffc39 Mon Sep 17 00:00:00 2001 From: vadym Date: Sun, 19 Jul 2020 09:31:12 -0700 Subject: [PATCH] 1. new peers after notification click update issue --- .../chronosx88/yggdrasil/MainActivity.kt | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt index e525341..839faef 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt @@ -100,7 +100,9 @@ class MainActivity : AppCompatActivity() { currentPeers = deserializeStringSet2PeerInfoSet(preferences.getStringSet(CURRENT_PEERS, HashSet())!!) val adapter = PeerInfoListAdapter(this, currentPeers.sortedWith(compareBy { it.ping })) peersListView.adapter = adapter - + if(isStarted && this.currentPeers.isEmpty()) { + updatePeers() + } val copyAddressButton = findViewById