2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Choose send as in scheduled / discussions.

This commit is contained in:
John Preston
2021-11-09 21:04:42 +04:00
parent ad52c0cb16
commit 8c824edaa5
9 changed files with 62 additions and 18 deletions

View File

@@ -2387,10 +2387,7 @@ void HistoryWidget::setupSendAsToggle() {
void HistoryWidget::refreshSendAsToggle() {
Expects(_peer != nullptr);
session().sendAsPeers().refresh(_peer);
const auto &list = session().sendAsPeers().list(_peer);
const auto has = _peer->canWrite() && (list.size() > 1);
if (!has) {
if (!session().sendAsPeers().shouldChoose(_peer)) {
_sendAs.destroy();
return;
} else if (_sendAs) {