From ef782bbda32cc79dc967befbbfdf39675d729624 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Fri, 17 Jul 2020 00:57:12 +0300 Subject: [PATCH] Video avatar fixes --- submodules/GalleryUI/Sources/GalleryPagerNode.swift | 4 ++++ .../Sources/PeerAvatarImageGalleryItem.swift | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/submodules/GalleryUI/Sources/GalleryPagerNode.swift b/submodules/GalleryUI/Sources/GalleryPagerNode.swift index b51506c3e2..be4e797c59 100644 --- a/submodules/GalleryUI/Sources/GalleryPagerNode.swift +++ b/submodules/GalleryUI/Sources/GalleryPagerNode.swift @@ -343,6 +343,10 @@ public final class GalleryPagerNode: ASDisplayNode, UIScrollViewDelegate, UIGest } self.transaction(GalleryPagerTransaction(deleteItems: deleteItems, insertItems: insertItems, updateItems: updateItems, focusOnItem: centralItemIndex, synchronous: synchronous)) + + if self.updateOnReplacement { + self.items = items + } } public func transaction(_ transaction: GalleryPagerTransaction) { diff --git a/submodules/PeerAvatarGalleryUI/Sources/PeerAvatarImageGalleryItem.swift b/submodules/PeerAvatarGalleryUI/Sources/PeerAvatarImageGalleryItem.swift index 7872f0fdfb..cbb2b1134e 100644 --- a/submodules/PeerAvatarGalleryUI/Sources/PeerAvatarImageGalleryItem.swift +++ b/submodules/PeerAvatarGalleryUI/Sources/PeerAvatarImageGalleryItem.swift @@ -43,8 +43,6 @@ private struct PeerAvatarImageGalleryThumbnailItem: GalleryThumbnailItem { } class PeerAvatarImageGalleryItem: GalleryItem { - - var id: AnyHashable { return self.entry.id }