Stickers: Ignore reorder for stickers without a pack (#5483)

This commit is contained in:
zubiden 2025-01-21 18:21:55 +01:00 committed by Alexander Zinchuk
parent c73edd986b
commit cfad59e2f0

View File

@ -90,7 +90,7 @@ addActionHandler('apiUpdate', (global, actions, update): ActionReturnType => {
case 'updateMoveStickerSetToTop': {
const oldOrder = update.isCustomEmoji ? global.customEmojis.added.setIds : global.stickers.added.setIds;
if (!oldOrder) return global;
if (!oldOrder?.some((id) => id === update.id)) return global;
const newOrder = [update.id, ...oldOrder.filter((id) => id !== update.id)];
actions.reorderStickerSets({ order: newOrder, isCustomEmoji: update.isCustomEmoji });
break;