From 192e9c3af8a664dfd33cc5181053d557ece3f739 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Fri, 10 Dec 2021 18:26:13 +0400 Subject: [PATCH] Ensure no send as button is shown when only one peer available --- submodules/TelegramUI/Sources/ChatController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index 6064ac4bdd..fdc2e9e21d 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -4871,6 +4871,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G allPeers?.insert(currentAccountPeer, at: 0) } } + if allPeers?.count == 1 { + allPeers = nil + } strongSelf.updateChatPresentationInterfaceState(animated: true, interactive: false, { return $0.updatedSendAsPeers(allPeers) })