mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
chore: refactor markReadAfterAction
https://github.com/AyuGram/AyuGramDesktop/issues/328
This commit is contained in:
@@ -46,6 +46,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QClipboard>
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/utils/telegram_helpers.h"
|
||||
|
||||
|
||||
namespace Api {
|
||||
namespace {
|
||||
|
||||
@@ -424,6 +428,7 @@ void ActivateBotCommand(ClickHandlerContext context, int row, int column) {
|
||||
const auto id = int32(button->buttonId);
|
||||
const auto chosen = [=](std::vector<not_null<PeerData*>> result) {
|
||||
using Flag = MTPmessages_SendBotRequestedPeer::Flag;
|
||||
markReadAfterAction(item->history());
|
||||
peer->session().api().request(MTPmessages_SendBotRequestedPeer(
|
||||
MTP_flags(Flag::f_msg_id),
|
||||
peer->input(),
|
||||
@@ -573,6 +578,7 @@ void ActivateBotCommand(ClickHandlerContext context, int row, int column) {
|
||||
.suggestedUsername = suggestedUsername,
|
||||
.done = [=](not_null<UserData*> createdBot) {
|
||||
using Flag = MTPmessages_SendBotRequestedPeer::Flag;
|
||||
markReadAfterAction(item->history());
|
||||
peer->session().api().request(
|
||||
MTPmessages_SendBotRequestedPeer(
|
||||
MTP_flags(Flag::f_msg_id),
|
||||
|
||||
Reference in New Issue
Block a user