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

Version bumped to 0.9.61 stable.

Merge branch 'archived_stickers' into cancel_reset.

Conflicts:
	Telegram/Resources/winrc/Telegram.rc
	Telegram/Resources/winrc/Updater.rc
	Telegram/SourceFiles/app.cpp
	Telegram/SourceFiles/core/version.h
	Telegram/SourceFiles/localstorage.cpp
	Telegram/Telegram.vcxproj.filters
	Telegram/Telegram.xcodeproj/project.pbxproj
	Telegram/build/version
This commit is contained in:
John Preston
2016-07-25 22:54:40 +03:00
61 changed files with 3998 additions and 1344 deletions

View File

@@ -923,12 +923,12 @@ void ApiWrap::gotStickerSet(uint64 setId, const MTPmessages_StickerSet &result)
_stickerSetRequests.remove(setId);
if (result.type() != mtpc_messages_stickerSet) return;
const auto &d(result.c_messages_stickerSet());
auto &d(result.c_messages_stickerSet());
if (d.vset.type() != mtpc_stickerSet) return;
const auto &s(d.vset.c_stickerSet());
auto &s(d.vset.c_stickerSet());
Stickers::Sets &sets(Global::RefStickerSets());
auto &sets = Global::RefStickerSets();
auto it = sets.find(setId);
if (it == sets.cend()) return;
@@ -936,7 +936,9 @@ void ApiWrap::gotStickerSet(uint64 setId, const MTPmessages_StickerSet &result)
it->hash = s.vhash.v;
it->shortName = qs(s.vshort_name);
it->title = stickerSetTitle(s);
it->flags = s.vflags.v;
auto clientFlags = it->flags & (MTPDstickerSet_ClientFlag::f_featured | MTPDstickerSet_ClientFlag::f_unread | MTPDstickerSet_ClientFlag::f_not_loaded | MTPDstickerSet_ClientFlag::f_special);
it->flags = s.vflags.v | clientFlags;
it->flags &= ~MTPDstickerSet_ClientFlag::f_not_loaded;
const auto &d_docs(d.vdocuments.c_vector().v);
auto custom = sets.find(Stickers::CustomSetId);
@@ -1002,7 +1004,14 @@ void ApiWrap::gotStickerSet(uint64 setId, const MTPmessages_StickerSet &result)
Local::writeUserSettings();
}
Local::writeStickers();
if (it->flags & MTPDstickerSet::Flag::f_installed) {
if (!(it->flags & MTPDstickerSet::Flag::f_archived)) {
Local::writeInstalledStickers();
}
}
if (it->flags & MTPDstickerSet_ClientFlag::f_featured) {
Local::writeFeaturedStickers();
}
if (App::main()) emit App::main()->stickersUpdated();
}