Video avatar fixes

This commit is contained in:
Ilya Laktyushin
2020-06-24 18:06:08 +03:00
parent 4755ee4261
commit a34b7402be
62 changed files with 753 additions and 1962 deletions

View File

@@ -628,7 +628,7 @@ func editSettingsController(context: AccountContext, currentName: ItemListAvatar
if let profileImage = peer?.smallProfileImage {
return $0.withUpdatedUpdatingAvatar(.image(profileImage, false))
} else {
return $0.withUpdatedUpdatingAvatar(.none)
return $0.withUpdatedUpdatingAvatar(ItemListAvatarAndNameInfoItemUpdatingAvatar.none)
}
}
updateAvatarDisposable.set((updateAccountPhoto(account: context.account, resource: nil, videoResource: nil, mapResourceToAvatarSizes: { resource, representations in

View File

@@ -301,7 +301,7 @@ public class WallpaperGalleryController: ViewController {
updateItems.append(item)
i += 1
}
return GalleryPagerTransaction(deleteItems: [], insertItems: [], updateItems: updateItems, focusOnItem: self.galleryNode.pager.centralItemNode()?.index)
return GalleryPagerTransaction(deleteItems: [], insertItems: [], updateItems: updateItems, focusOnItem: self.galleryNode.pager.centralItemNode()?.index, synchronous: false)
}
override public func loadDisplayNode() {

View File

@@ -51,13 +51,13 @@ class WallpaperGalleryItem: GalleryItem {
self.source = source
}
func node() -> GalleryItemNode {
func node(synchronous: Bool) -> GalleryItemNode {
let node = WallpaperGalleryItemNode(context: self.context)
node.setEntry(self.entry, arguments: self.arguments, source: self.source)
return node
}
func updateNode(node: GalleryItemNode) {
func updateNode(node: GalleryItemNode, synchronous: Bool) {
if let node = node as? WallpaperGalleryItemNode {
node.setEntry(self.entry, arguments: self.arguments, source: self.source)
}