2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 15:15:13 +00:00

When installing sticker set some sets can be archived.

We show a box with them and describing what happend.
Limit of the recent stickers count is taken from config now.
This commit is contained in:
John Preston
2016-07-18 18:39:10 +03:00
parent 95c050081c
commit b35c99cb0c
19 changed files with 730 additions and 240 deletions

View File

@@ -890,13 +890,13 @@ bool StickerData::setInstalled() const {
switch (set.type()) {
case mtpc_inputStickerSetID: {
auto it = Global::StickerSets().constFind(set.c_inputStickerSetID().vid.v);
return (it != Global::StickerSets().cend()) && !(it->flags & MTPDstickerSet::Flag::f_disabled) && (it->flags & MTPDstickerSet::Flag::f_installed);
return (it != Global::StickerSets().cend()) && !(it->flags & MTPDstickerSet::Flag::f_archived) && (it->flags & MTPDstickerSet::Flag::f_installed);
} break;
case mtpc_inputStickerSetShortName: {
QString name = qs(set.c_inputStickerSetShortName().vshort_name).toLower();
for (auto it = Global::StickerSets().cbegin(), e = Global::StickerSets().cend(); it != e; ++it) {
if (it->shortName.toLower() == name) {
return !(it->flags & MTPDstickerSet::Flag::f_disabled) && (it->flags & MTPDstickerSet::Flag::f_installed);
return !(it->flags & MTPDstickerSet::Flag::f_archived) && (it->flags & MTPDstickerSet::Flag::f_installed);
}
}
} break;