2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Move stickers state variables to AuthSessionData.

Also allow to click on the selected set when choosing megagroup
sticker set and allow to paste a t.me link to the set there.
This commit is contained in:
John Preston
2017-11-05 21:07:27 +04:00
parent 9a56b2d20f
commit 554eb3a342
31 changed files with 673 additions and 479 deletions

View File

@@ -124,14 +124,14 @@ void Gif::setPosition(int32 position) {
}
void DeleteSavedGifClickHandler::onClickImpl() const {
auto index = cSavedGifs().indexOf(_data);
auto index = Auth().data().savedGifs().indexOf(_data);
if (index >= 0) {
cRefSavedGifs().remove(index);
Auth().data().savedGifsRef().remove(index);
Local::writeSavedGifs();
MTP::send(MTPmessages_SaveGif(_data->mtpInput(), MTP_bool(true)));
}
Auth().data().savedGifsUpdated().notify();
Auth().data().markSavedGifsUpdated();
}
void Gif::paint(Painter &p, const QRect &clip, const PaintContext *context) const {