mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Merge commit '3a0a251839d5cd08193972e1966fdc3f8ee0202c' into beta
This commit is contained in:
commit
b25c69fb6c
@ -499,7 +499,13 @@ const CGFloat TGPhotoEditorToolsLandscapePanelSize = TGPhotoEditorToolsPanelSize
|
||||
|
||||
[TGPhotoEditorAnimation performBlock:^(__unused bool allFinished)
|
||||
{
|
||||
[snapshotView removeFromSuperview];
|
||||
if (self.intent == TGPhotoEditorControllerWallpaperIntent) {
|
||||
TGDispatchAfter(0.3, dispatch_get_main_queue(), ^{
|
||||
[snapshotView removeFromSuperview];
|
||||
});
|
||||
} else {
|
||||
[snapshotView removeFromSuperview];
|
||||
}
|
||||
|
||||
if (completion != nil)
|
||||
completion();
|
||||
|
@ -2783,12 +2783,15 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
||||
if self.isAvatarExpanded, case .animated = transition, transitionFraction == 1.0 {
|
||||
self.avatarListNode.animateAvatarCollapse(transition: transition)
|
||||
}
|
||||
self.avatarClippingNode.clipsToBounds = false
|
||||
} else {
|
||||
let contentOffset = max(0.0, contentOffset - 140.0)
|
||||
let backgroundTransitionFraction: CGFloat = max(0.0, min(1.0, contentOffset / 30.0))
|
||||
|
||||
self.expandedBackgroundNode.updateColor(color: presentationData.theme.rootController.navigationBar.opaqueBackgroundColor.mixedWith(headerBackgroundColor, alpha: 1.0 - backgroundTransitionFraction), forceKeepBlur: true, transition: transition)
|
||||
effectiveSeparatorAlpha = backgroundTransitionFraction
|
||||
|
||||
self.avatarClippingNode.clipsToBounds = true
|
||||
}
|
||||
|
||||
self.avatarListNode.avatarContainerNode.updateTransitionFraction(transitionFraction, transition: transition)
|
||||
@ -3291,7 +3294,7 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
||||
controlsClippingFrame = apparentAvatarFrame
|
||||
}
|
||||
|
||||
let avatarClipOffset: CGFloat = !self.isAvatarExpanded && deviceMetrics.hasDynamicIsland ? 48.0 : 0.0
|
||||
let avatarClipOffset: CGFloat = !self.isAvatarExpanded && deviceMetrics.hasDynamicIsland && self.avatarClippingNode.clipsToBounds ? 48.0 : 0.0
|
||||
let clippingNodeTransition = ContainedViewLayoutTransition.immediate
|
||||
clippingNodeTransition.updateFrame(layer: self.avatarClippingNode.layer, frame: CGRect(origin: CGPoint(x: 0.0, y: avatarClipOffset), size: CGSize(width: width, height: 1000.0)))
|
||||
clippingNodeTransition.updateSublayerTransformOffset(layer: self.avatarClippingNode.layer, offset: CGPoint(x: 0.0, y: -avatarClipOffset))
|
||||
@ -3338,7 +3341,7 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
||||
transition.updateSublayerTransformScale(node: self.avatarListNode.listContainerTransformNode, scale: avatarListContainerScale)
|
||||
}
|
||||
|
||||
if deviceMetrics.hasDynamicIsland && self.forumTopicThreadId == nil {
|
||||
if deviceMetrics.hasDynamicIsland && self.forumTopicThreadId == nil && self.navigationTransition == nil {
|
||||
let maskValue = max(0.0, min(1.0, contentOffset / 120.0))
|
||||
self.avatarListNode.containerNode.view.mask = self.avatarListNode.maskNode.view
|
||||
if maskValue > 0.03 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user