Ensure no send as button is shown when only one peer available

This commit is contained in:
Ilya Laktyushin
2021-12-10 18:26:13 +04:00
parent 54cd578656
commit 192e9c3af8

View File

@@ -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)
})