mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
fixed code for old Qt versions
This commit is contained in:
@@ -105,7 +105,8 @@ void StickerSetInner::installDone(const MTPBool &result) {
|
||||
StickerSets::iterator custom = sets.find(CustomStickerSetId);
|
||||
if (custom != sets.cend()) {
|
||||
for (int32 i = 0, l = _pack.size(); i < l; ++i) {
|
||||
custom->stickers.removeOne(_pack.at(i));
|
||||
int32 removeIndex = custom->stickers.indexOf(_pack.at(i));
|
||||
if (removeIndex >= 0) custom->stickers.removeAt(removeIndex);
|
||||
}
|
||||
if (custom->stickers.isEmpty()) {
|
||||
sets.erase(custom);
|
||||
@@ -846,7 +847,8 @@ void StickersBox::onSave() {
|
||||
it->flags |= MTPDstickerSet::flag_disabled;
|
||||
} else {
|
||||
_disenableRequests.insert(MTP::send(MTPmessages_UninstallStickerSet(setId), rpcDone(&StickersBox::disenableDone), rpcFail(&StickersBox::disenableFail), 0, 5), NullType());
|
||||
cRefStickerSetsOrder().removeOne(it->id);
|
||||
int32 removeIndex = cStickerSetsOrder().indexOf(it->id);
|
||||
if (removeIndex >= 0) cRefStickerSetsOrder().removeAt(removeIndex);
|
||||
sets.erase(it);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user