From 0c5a3b0f82191574087de05247ddb8ec5dc660ce Mon Sep 17 00:00:00 2001 From: vadym Date: Sun, 23 Aug 2020 21:38:43 +0300 Subject: [PATCH] 1. remove checkmarks fix --- .../models/config/SelectPeerInfoListAdapter.kt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SelectPeerInfoListAdapter.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SelectPeerInfoListAdapter.kt index 5bb0914..addb6d5 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SelectPeerInfoListAdapter.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SelectPeerInfoListAdapter.kt @@ -57,15 +57,13 @@ class SelectPeerInfoListAdapter( peerInfoHolder.peerInfoText.setTextColor(Color.WHITE) } peerInfoHolder.checkbox.setOnCheckedChangeListener { _, isChecked -> - if(!isLoading) { - if (isChecked) { - if (!currentPeers.contains(currentPeer)) { - currentPeers.add(currentPeer) - } - } else { - if (currentPeers.contains(currentPeer)) { - currentPeers.remove(currentPeer) - } + if (isChecked) { + if (!currentPeers.contains(currentPeer)) { + currentPeers.add(currentPeer) + } + } else { + if (currentPeers.contains(currentPeer)) { + currentPeers.remove(currentPeer) } } }