2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35: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

@@ -54,9 +54,9 @@ void hideSingleUseKeyboard(const HistoryItem *msg) {
}
}
bool insertBotCommand(const QString &cmd, bool specialGif) {
bool insertBotCommand(const QString &cmd) {
if (auto m = main()) {
return m->insertBotCommand(cmd, specialGif);
return m->insertBotCommand(cmd);
}
return false;
}
@@ -264,20 +264,6 @@ void repaintHistoryItem(const HistoryItem *item) {
}
}
void repaintInlineItem(const InlineBots::Layout::ItemBase *layout) {
if (!layout) return;
if (auto main = App::main()) {
main->ui_repaintInlineItem(layout);
}
}
bool isInlineItemVisible(const InlineBots::Layout::ItemBase *layout) {
if (auto main = App::main()) {
return main->ui_isInlineItemVisible(layout);
}
return false;
}
void autoplayMediaInlineAsync(const FullMsgId &msgId) {
if (auto main = App::main()) {
QMetaObject::invokeMethod(main, "ui_autoplayMediaInlineAsync", Qt::QueuedConnection, Q_ARG(qint32, msgId.channel), Q_ARG(qint32, msgId.msg));
@@ -386,10 +372,6 @@ void historyItemLayoutChanged(const HistoryItem *item) {
if (MainWidget *m = App::main()) m->notify_historyItemLayoutChanged(item);
}
void inlineItemLayoutChanged(const InlineBots::Layout::ItemBase *layout) {
if (MainWidget *m = App::main()) m->notify_inlineItemLayoutChanged(layout);
}
void historyMuteUpdated(History *history) {
if (MainWidget *m = App::main()) m->notify_historyMuteUpdated(history);
}