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 0de685e..60b4e3c 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt @@ -2,6 +2,8 @@ package io.github.chronosx88.yggdrasil import android.app.Activity import android.app.ActivityManager +import android.content.ClipData +import android.content.ClipboardManager import android.content.Context import android.content.Intent import android.net.VpnService @@ -65,9 +67,19 @@ class MainActivity : AppCompatActivity() { val preferences = PreferenceManager.getDefaultSharedPreferences(this.baseContext) currentPeers = deserializeStringSet2PeerInfoSet(preferences.getStringSet(CURRENT_PEERS, HashSet())!!) - val adapter = PeerInfoListAdapter(this, currentPeers.sortedWith(compareBy { it.ping })) listView.adapter = adapter + + val copyAddressButton = findViewById