2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Show inline bot results in a separate widget.

Add a InlineBots::Layout::Widget for inline bot results.
GIF search from EmojiPan is disabled for now.
This commit is contained in:
John Preston
2017-03-27 21:11:51 +03:00
parent 5cb66c99bd
commit 3d846fcd49
19 changed files with 1616 additions and 287 deletions

View File

@@ -554,14 +554,6 @@ void MainWidget::ui_repaintHistoryItem(const HistoryItem *item) {
if (_overview) _overview->ui_repaintHistoryItem(item);
}
void MainWidget::ui_repaintInlineItem(const InlineBots::Layout::ItemBase *layout) {
_history->ui_repaintInlineItem(layout);
}
bool MainWidget::ui_isInlineItemVisible(const InlineBots::Layout::ItemBase *layout) {
return _history->ui_isInlineItemVisible(layout);
}
bool MainWidget::ui_isInlineItemBeingChosen() {
return _history->ui_isInlineItemBeingChosen();
}
@@ -571,10 +563,6 @@ void MainWidget::notify_historyItemLayoutChanged(const HistoryItem *item) {
if (_overview) _overview->notify_historyItemLayoutChanged(item);
}
void MainWidget::notify_inlineItemLayoutChanged(const InlineBots::Layout::ItemBase *layout) {
_history->notify_inlineItemLayoutChanged(layout);
}
void MainWidget::notify_historyMuteUpdated(History *history) {
_dialogs->notify_historyMuteUpdated(history);
}
@@ -1339,8 +1327,8 @@ void MainWidget::app_sendBotCallback(const HistoryMessageReplyMarkup::Button *bu
_history->app_sendBotCallback(button, msg, row, col);
}
bool MainWidget::insertBotCommand(const QString &cmd, bool specialGif) {
return _history->insertBotCommand(cmd, specialGif);
bool MainWidget::insertBotCommand(const QString &cmd) {
return _history->insertBotCommand(cmd);
}
void MainWidget::searchMessages(const QString &query, PeerData *inPeer) {
@@ -1564,7 +1552,7 @@ void MainWidget::handleAudioUpdate(const AudioMsgId &audioId) {
}
if (auto items = InlineBots::Layout::documentItems()) {
for (auto item : items->value(audioId.audio())) {
Ui::repaintInlineItem(item);
item->update();
}
}
}