mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Allow setting group stickers set.
This commit is contained in:
@@ -927,7 +927,7 @@ void ApiWrap::saveStickerSets(const Stickers::Order &localOrder, const Stickers:
|
||||
if (writeArchived) Local::writeArchivedStickers();
|
||||
if (writeCloudRecent) Local::writeRecentStickers();
|
||||
if (writeFaved) Local::writeFavedStickers();
|
||||
emit App::main()->stickersUpdated();
|
||||
Auth().data().stickersUpdated().notify(true);
|
||||
|
||||
if (_stickerSetDisenableRequests.isEmpty()) {
|
||||
stickersSaveOrder();
|
||||
@@ -1466,6 +1466,13 @@ void ApiWrap::updateStickers() {
|
||||
requestSavedGifs(now);
|
||||
}
|
||||
|
||||
void ApiWrap::setGroupStickerSet(gsl::not_null<ChannelData*> megagroup, const MTPInputStickerSet &set) {
|
||||
Expects(megagroup->mgInfo != nullptr);
|
||||
megagroup->mgInfo->stickerSet = set;
|
||||
request(MTPchannels_SetStickers(megagroup->inputChannel, set)).send();
|
||||
Auth().data().stickersUpdated().notify(true);
|
||||
}
|
||||
|
||||
void ApiWrap::requestStickers(TimeId now) {
|
||||
if (Global::LastStickersUpdate() != 0 && now < Global::LastStickersUpdate() + kStickersUpdateTimeout) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user