diff --git a/submodules/SelectablePeerNode/Sources/SelectablePeerNode.swift b/submodules/SelectablePeerNode/Sources/SelectablePeerNode.swift index 17164ea1d2..947d3cb4c8 100644 --- a/submodules/SelectablePeerNode/Sources/SelectablePeerNode.swift +++ b/submodules/SelectablePeerNode/Sources/SelectablePeerNode.swift @@ -186,7 +186,7 @@ public final class SelectablePeerNode: ASDisplayNode { if let fileId = iconId { iconContent = .animation(content: .customEmoji(fileId: fileId), size: CGSize(width: 18.0, height: 18.0), placeholderColor: theme.actionSheet.disabledActionTextColor, themeColor: theme.actionSheet.primaryTextColor, loopMode: .count(2)) } else if let customTitle = customTitle { - iconContent = .topic(title: String(customTitle.prefix(1)), color: iconColor ?? 0, size: CGSize(width: 18.0, height: 18.0)) + iconContent = .topic(title: String(customTitle.prefix(1)), color: iconColor ?? 0, size: CGSize(width: 32.0, height: 32.0)) } else { iconContent = nil } diff --git a/submodules/ShareController/Sources/ShareControllerNode.swift b/submodules/ShareController/Sources/ShareControllerNode.swift index a3691edfc6..29d580b520 100644 --- a/submodules/ShareController/Sources/ShareControllerNode.swift +++ b/submodules/ShareController/Sources/ShareControllerNode.swift @@ -298,13 +298,14 @@ final class ShareControllerNode: ViewControllerTracingNode, UIScrollViewDelegate } }, selectTopic: { [weak self] peer, threadId, threadData in if let strongSelf = self { - strongSelf.controllerInteraction?.selectedPeerIds.insert(peer) - strongSelf.controllerInteraction?.selectedTopics[peer] = (threadId, threadData) + strongSelf.controllerInteraction?.selectedPeers.append(peer) + strongSelf.controllerInteraction?.selectedPeerIds.insert(peer.peerId) + strongSelf.controllerInteraction?.selectedTopics[peer.peerId] = (threadId, threadData) strongSelf.peersContentNode?.update() strongSelf.peersContentNode?.updateSelectedPeers(animated: false) strongSelf.updateButton() Queue.mainQueue().after(0.01, { - strongSelf.closePeerTopics(peer) + strongSelf.closePeerTopics(peer.peerId) }) } }) @@ -1063,7 +1064,7 @@ final class ShareControllerNode: ViewControllerTracingNode, UIScrollViewDelegate } private func updateButton() { - let count = self.controllerInteraction!.selectedPeerIds.count + let count = self.controllerInteraction!.selectedPeers.count if count == 0 { if self.presetText != nil { self.actionButtonNode.setTitle(self.presentationData.strings.ShareMenu_Send, with: Font.medium(20.0), with: self.presentationData.theme.actionSheet.disabledActionTextColor, for: .normal) diff --git a/submodules/ShareController/Sources/ShareControllerPeerGridItem.swift b/submodules/ShareController/Sources/ShareControllerPeerGridItem.swift index f8c839ccbd..4e7a4c4b7e 100644 --- a/submodules/ShareController/Sources/ShareControllerPeerGridItem.swift +++ b/submodules/ShareController/Sources/ShareControllerPeerGridItem.swift @@ -20,9 +20,9 @@ final class ShareControllerInteraction { var selectedTopics: [EnginePeer.Id: (Int64, MessageHistoryThreadData)] = [:] let togglePeer: (EngineRenderedPeer, Bool) -> Void - let selectTopic: (EnginePeer.Id, Int64, MessageHistoryThreadData) -> Void + let selectTopic: (EngineRenderedPeer, Int64, MessageHistoryThreadData) -> Void - init(togglePeer: @escaping (EngineRenderedPeer, Bool) -> Void, selectTopic: @escaping (EnginePeer.Id, Int64, MessageHistoryThreadData) -> Void) { + init(togglePeer: @escaping (EngineRenderedPeer, Bool) -> Void, selectTopic: @escaping (EngineRenderedPeer, Int64, MessageHistoryThreadData) -> Void) { self.togglePeer = togglePeer self.selectTopic = selectTopic } diff --git a/submodules/ShareController/Sources/ShareTopicGridItem.swift b/submodules/ShareController/Sources/ShareTopicGridItem.swift index 34912f2118..8f58557fb5 100644 --- a/submodules/ShareController/Sources/ShareTopicGridItem.swift +++ b/submodules/ShareController/Sources/ShareTopicGridItem.swift @@ -76,8 +76,8 @@ final class ShareTopicGridItemNode: GridItemNode { } @objc private func tapped() { - if let item = self.currentItem, let peerId = item.peer?.peerId { - item.controllerInteraction.selectTopic(peerId, item.id, item.threadInfo) + if let item = self.currentItem, let peer = item.peer { + item.controllerInteraction.selectTopic(peer, item.id, item.threadInfo) } }