mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Update API scheme.
This commit is contained in:
@@ -155,14 +155,18 @@ QString saveFileName(const QString &title, const QString &filter, const QString
|
||||
bool StickerData::setInstalled() const {
|
||||
switch (set.type()) {
|
||||
case mtpc_inputStickerSetID: {
|
||||
auto it = Auth().data().stickerSets().constFind(set.c_inputStickerSetID().vid.v);
|
||||
return (it != Auth().data().stickerSets().cend()) && !(it->flags & MTPDstickerSet::Flag::f_archived) && (it->flags & MTPDstickerSet::Flag::f_installed);
|
||||
auto it = Auth().data().stickerSets().constFind(
|
||||
set.c_inputStickerSetID().vid.v);
|
||||
return (it != Auth().data().stickerSets().cend())
|
||||
&& !(it->flags & MTPDstickerSet::Flag::f_archived)
|
||||
&& (it->flags & MTPDstickerSet::Flag::f_installed_date);
|
||||
} break;
|
||||
case mtpc_inputStickerSetShortName: {
|
||||
auto name = qs(set.c_inputStickerSetShortName().vshort_name).toLower();
|
||||
for (auto it = Auth().data().stickerSets().cbegin(), e = Auth().data().stickerSets().cend(); it != e; ++it) {
|
||||
if (it->shortName.toLower() == name) {
|
||||
return !(it->flags & MTPDstickerSet::Flag::f_archived) && (it->flags & MTPDstickerSet::Flag::f_installed);
|
||||
return !(it->flags & MTPDstickerSet::Flag::f_archived)
|
||||
&& (it->flags & MTPDstickerSet::Flag::f_installed_date);
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
Reference in New Issue
Block a user