mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Pass MTP::Instance to MTP::Sender.
This commit is contained in:
@@ -661,6 +661,7 @@ StickersBox::Inner::Inner(
|
||||
StickersBox::Section section)
|
||||
: RpWidget(parent)
|
||||
, _session(session)
|
||||
, _api(_session->api().instance())
|
||||
, _section(section)
|
||||
, _rowHeight(st::contactsPadding.top() + st::contactsPhotoSize + st::contactsPadding.bottom())
|
||||
, _shiftingAnimation([=](crl::time now) {
|
||||
@@ -677,6 +678,7 @@ StickersBox::Inner::Inner(
|
||||
StickersBox::Inner::Inner(QWidget *parent, not_null<ChannelData*> megagroup)
|
||||
: RpWidget(parent)
|
||||
, _session(&megagroup->session())
|
||||
, _api(_session->api().instance())
|
||||
, _section(StickersBox::Section::Installed)
|
||||
, _rowHeight(st::contactsPadding.top() + st::contactsPhotoSize + st::contactsPadding.bottom())
|
||||
, _shiftingAnimation([=](crl::time now) {
|
||||
@@ -1469,11 +1471,13 @@ void StickersBox::Inner::handleMegagroupSetAddressChange() {
|
||||
}
|
||||
}
|
||||
} else if (!_megagroupSetRequestId) {
|
||||
_megagroupSetRequestId = request(MTPmessages_GetStickerSet(MTP_inputStickerSetShortName(MTP_string(text)))).done([this](const MTPmessages_StickerSet &result) {
|
||||
_megagroupSetRequestId = _api.request(MTPmessages_GetStickerSet(
|
||||
MTP_inputStickerSetShortName(MTP_string(text))
|
||||
)).done([=](const MTPmessages_StickerSet &result) {
|
||||
_megagroupSetRequestId = 0;
|
||||
auto set = Stickers::FeedSetFull(result);
|
||||
setMegagroupSelectedSet(MTP_inputStickerSetID(MTP_long(set->id), MTP_long(set->access)));
|
||||
}).fail([this](const RPCError &error) {
|
||||
}).fail([=](const RPCError &error) {
|
||||
_megagroupSetRequestId = 0;
|
||||
setMegagroupSelectedSet(MTP_inputStickerSetEmpty());
|
||||
}).send();
|
||||
|
Reference in New Issue
Block a user