2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

fixed dropdown behaviour for @gif search from saved gifs panel

This commit is contained in:
John Preston
2016-01-02 11:45:05 +08:00
parent 2f130ff223
commit 18de2f724c
4 changed files with 81 additions and 47 deletions

View File

@@ -2844,7 +2844,7 @@ void HistoryWidget::updateInlineBotQuery() {
if (_inlineBot != bot) {
updateFieldPlaceholder();
}
if (_inlineBot->username == (cTestMode() ? qstr("contextbot") : qstr("gif")) && query.isEmpty()) {
if (_inlineBot->username == cInlineGifBotUsername() && query.isEmpty()) {
_emojiPan.clearInlineBot();
} else {
_emojiPan.queryInlineBot(_inlineBot, query);
@@ -4910,7 +4910,7 @@ bool HistoryWidget::insertBotCommand(const QString &cmd, bool specialGif) {
if (toInsert.at(0) != '@') {
QString text = _field.getLastText();
if (specialGif) {
if (text.trimmed() == (cTestMode() ? qstr("@contextbot") : qstr("@gif")) && text.at(0) == '@') {
if (text.trimmed() == '@' + cInlineGifBotUsername() && text.at(0) == '@') {
setFieldText(QString(), TextUpdateEventsSaveDraft, false);
}
} else {