mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Video avatar fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user