Various fixes

This commit is contained in:
Ilya Laktyushin 2025-03-07 23:26:30 +04:00
parent edecdd7fec
commit af654744b0

View File

@ -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