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:
@@ -306,18 +306,7 @@ private final class StickerPackContainer: ASDisplayNode {
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
if let mainPreviewIconView = self.mainPreviewIcon?.view {
|
||||
mainPreviewIconView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak self] _ in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
if let mainPreviewIconView = self.mainPreviewIcon?.view {
|
||||
self.mainPreviewIcon = nil
|
||||
mainPreviewIconView.removeFromSuperview()
|
||||
}
|
||||
})
|
||||
mainPreviewIconView.layer.animateScale(from: 1.0, to: 0.5, duration: 0.2, removeOnCompletion: false)
|
||||
}
|
||||
self.hideMainPreviewIcon()
|
||||
}
|
||||
|
||||
self.gridNode.interactiveScrollingEnded = { [weak self] in
|
||||
@@ -643,6 +632,8 @@ private final class StickerPackContainer: ASDisplayNode {
|
||||
return nil
|
||||
}, present: { [weak self] content, sourceView, sourceRect in
|
||||
if let strongSelf = self {
|
||||
strongSelf.hideMainPreviewIcon()
|
||||
|
||||
let controller = PeekController(presentationData: strongSelf.presentationData, content: content, sourceView: {
|
||||
return (sourceView, sourceRect)
|
||||
})
|
||||
@@ -697,6 +688,21 @@ private final class StickerPackContainer: ASDisplayNode {
|
||||
self.gridNode.view.addGestureRecognizer(reorderingGestureRecognizer)
|
||||
}
|
||||
|
||||
private func hideMainPreviewIcon() {
|
||||
if let mainPreviewIconView = self.mainPreviewIcon?.view {
|
||||
mainPreviewIconView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak self] _ in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
if let mainPreviewIconView = self.mainPreviewIcon?.view {
|
||||
self.mainPreviewIcon = nil
|
||||
mainPreviewIconView.removeFromSuperview()
|
||||
}
|
||||
})
|
||||
mainPreviewIconView.layer.animateScale(from: 1.0, to: 0.5, duration: 0.2, removeOnCompletion: false)
|
||||
}
|
||||
}
|
||||
|
||||
private var reorderFeedback: HapticFeedback?
|
||||
private var reorderNode: ReorderingItemNode?
|
||||
private var reorderInitialIndex: Int?
|
||||
@@ -2184,7 +2190,7 @@ private final class StickerPackContainer: ASDisplayNode {
|
||||
transition.updateFrame(node: self.backgroundNode, frame: backgroundFrame)
|
||||
|
||||
if let previewIconFile = self.previewIconFile, let mainPreviewIcon = self.mainPreviewIcon {
|
||||
let iconFitSize = CGSize(width: 90.0, height: 90.0)
|
||||
let iconFitSize = CGSize(width: 120.0, height: 120.0)
|
||||
let iconSize = mainPreviewIcon.update(
|
||||
transition: .immediate,
|
||||
component: AnyComponent(EmojiStatusComponent(
|
||||
|
||||
Reference in New Issue
Block a user