From bf789593de994cbb98c09efbe99f916187332e53 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Wed, 31 Mar 2021 23:56:35 +0300 Subject: [PATCH] Fix contact sharing --- submodules/ContactListUI/Sources/ContactListNode.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/submodules/ContactListUI/Sources/ContactListNode.swift b/submodules/ContactListUI/Sources/ContactListNode.swift index 3fa50cfa75..122dd2a09f 100644 --- a/submodules/ContactListUI/Sources/ContactListNode.swift +++ b/submodules/ContactListUI/Sources/ContactListNode.swift @@ -952,8 +952,10 @@ public final class ContactListNode: ASDisplayNode { }, openPeer: { [weak self] peer, action in if let strongSelf = self { if multipleSelection { + var updated = false strongSelf.updateSelectionState({ state in if let state = state { + updated = true var selectedPeerMap = state.selectedPeerMap selectedPeerMap[peer.id] = peer return state.withToggledPeerId(peer.id).withSelectedPeerMap(selectedPeerMap) @@ -961,6 +963,9 @@ public final class ContactListNode: ASDisplayNode { return nil } }) + if !updated { + strongSelf.openPeer?(peer, action) + } } else { strongSelf.openPeer?(peer, action) }