2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 23:45:44 +00:00

Featured stickers fully supported (unread badges, box, adding, etc).

This commit is contained in:
John Preston
2016-06-28 21:05:38 +03:00
parent 991c6ddd99
commit cd696ade4e
24 changed files with 656 additions and 304 deletions

View File

@@ -3378,7 +3378,6 @@ void MainWidget::stickersBox(const MTPInputStickerSet &set) {
}
void MainWidget::onStickersInstalled(uint64 setId) {
emit stickersUpdated();
_history->stickersInstalled(setId);
}
@@ -4731,9 +4730,16 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
} break;
case mtpc_updateReadFeaturedStickers: {
Global::RefFeaturedUnreadSets().clear();
Local::writeStickers();
emit stickersUpdated();
for (auto &set : Global::RefStickerSets()) {
if (set.flags & MTPDstickerSet_ClientFlag::f_unread) {
set.flags &= ~MTPDstickerSet_ClientFlag::f_unread;
}
}
if (Global::FeaturedStickerSetsUnreadCount()) {
Global::SetFeaturedStickerSetsUnreadCount(0);
Local::writeStickers();
emit stickersUpdated();
}
} break;
////// Cloud saved GIFs