2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Pass MTP::Instance to MTP::Sender.

This commit is contained in:
John Preston
2019-11-27 11:02:56 +03:00
parent a0152557ec
commit e943264823
65 changed files with 406 additions and 275 deletions

View File

@@ -99,7 +99,7 @@ private:
void showPreview();
not_null<Window::SessionController*> _controller;
MTP::Sender _mtp;
MTP::Sender _api;
std::vector<Element> _elements;
std::unique_ptr<Lottie::MultiPlayer> _lottiePlayer;
Stickers::Pack _pack;
@@ -220,6 +220,7 @@ StickerSetBox::Inner::Inner(
const MTPInputStickerSet &set)
: RpWidget(parent)
, _controller(controller)
, _api(_controller->session().api().instance())
, _input(set)
, _previewTimer([=] { showPreview(); }) {
set.match([&](const MTPDinputStickerSetID &data) {
@@ -231,7 +232,7 @@ StickerSetBox::Inner::Inner(
}, [&](const MTPDinputStickerSetAnimatedEmoji &) {
});
_mtp.request(MTPmessages_GetStickerSet(
_api.request(MTPmessages_GetStickerSet(
_input
)).done([=](const MTPmessages_StickerSet &result) {
gotSet(result);
@@ -700,7 +701,7 @@ void StickerSetBox::Inner::install() {
} else if (_installRequest) {
return;
}
_installRequest = _mtp.request(MTPmessages_InstallStickerSet(
_installRequest = _api.request(MTPmessages_InstallStickerSet(
_input,
MTP_bool(false)
)).done([=](const MTPmessages_StickerSetInstallResult &result) {