mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Various fixes
This commit is contained in:
@@ -320,6 +320,17 @@ func _internal_updatePeerPhotoInternal(postbox: Postbox, network: Network, state
|
||||
updatePeers(transaction: transaction, peers: [groupOrChannel], update: { _, updated in
|
||||
return updated
|
||||
})
|
||||
|
||||
transaction.updatePeerCachedData(peerIds: Set([peer.id]), update: { _, current in
|
||||
if let current = current as? CachedChannelData {
|
||||
return current.withUpdatedPhoto(nil)
|
||||
} else if let current = current as? CachedGroupData {
|
||||
return current.withUpdatedPhoto(nil)
|
||||
} else {
|
||||
return current
|
||||
}
|
||||
})
|
||||
|
||||
return .complete(groupOrChannel.profileImageRepresentations)
|
||||
}
|
||||
|> mapError { _ -> UploadPeerPhotoError in }
|
||||
|
||||
Reference in New Issue
Block a user