2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-25 15:16:15 +00:00

Support custom keyboard placeholders.

This commit is contained in:
John Preston
2021-07-05 20:59:23 +03:00
parent 7f00065bd8
commit aaefeed3f1
6 changed files with 35 additions and 11 deletions

View File

@@ -201,6 +201,7 @@ bool BotKeyboard::updateMarkup(HistoryItem *to, bool force) {
if (_wasForMsgId.msg) {
_maximizeSize = _singleUse = _forceReply = false;
_wasForMsgId = FullMsgId();
_placeholder = QString();
_impl = nullptr;
return true;
}
@@ -218,6 +219,12 @@ bool BotKeyboard::updateMarkup(HistoryItem *to, bool force) {
_maximizeSize = !(markupFlags & MTPDreplyKeyboardMarkup::Flag::f_resize);
_singleUse = _forceReply || (markupFlags & MTPDreplyKeyboardMarkup::Flag::f_single_use);
if (const auto markup = to->Get<HistoryMessageReplyMarkup>()) {
_placeholder = markup->placeholder;
} else {
_placeholder = QString();
}
_impl = nullptr;
if (auto markup = to->Get<HistoryMessageReplyMarkup>()) {
if (!markup->rows.empty()) {