feat: show bot start token

This commit is contained in:
AlexeyZavar 2024-08-10 10:05:58 +03:00
parent 23fb44a36b
commit b15402dc72

View file

@ -3024,6 +3024,14 @@ void HistoryWidget::updateControlsVisibility() {
} else if (isBotStart()) { } else if (isBotStart()) {
toggle(_botStart); toggle(_botStart);
_discuss->hide(); _discuss->hide();
const auto startToken = _peer->asUser()->botInfo->startToken;
if (!startToken.isEmpty()) {
const auto s = QString("%1 (%2)").arg(tr::lng_bot_start(tr::now).toUpper()).arg(startToken);
_botStart->setText(s);
} else {
_botStart->setText(tr::lng_bot_start(tr::now).toUpper());
}
} }
_kbShown = false; _kbShown = false;
_fieldAutocomplete->hide(); _fieldAutocomplete->hide();