diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Payments/StarGifts.swift b/submodules/TelegramCore/Sources/TelegramEngine/Payments/StarGifts.swift index 72c1af1dc3..a197b0609c 100644 --- a/submodules/TelegramCore/Sources/TelegramEngine/Payments/StarGifts.swift +++ b/submodules/TelegramCore/Sources/TelegramEngine/Payments/StarGifts.swift @@ -1210,6 +1210,10 @@ private final class ProfileGiftsContextImpl { if let reference = gift.reference, existingGifts.contains(reference) { continue } + var gift = gift + if gift.reference == reference { + gift = gift.withPinnedToTop(pinnedToTop) + } updatedGifts.append(gift) } updatedGifts.sort { lhs, rhs in @@ -1238,6 +1242,10 @@ private final class ProfileGiftsContextImpl { if let reference = gift.reference, existingFilteredGifts.contains(reference) { continue } + var gift = gift + if gift.reference == reference { + gift = gift.withPinnedToTop(pinnedToTop) + } updatedFilteredGifts.append(gift) } updatedFilteredGifts.sort { lhs, rhs in