mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-09 07:41:40 +00:00
no message
This commit is contained in:
parent
139fb8fc7c
commit
cad4955b71
@ -7,7 +7,7 @@
|
||||
<key>Display.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>7</integer>
|
||||
<integer>5</integer>
|
||||
</dict>
|
||||
<key>DisplayMac.xcscheme</key>
|
||||
<dict>
|
||||
@ -17,7 +17,7 @@
|
||||
<key>DisplayTests.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>9</integer>
|
||||
<integer>7</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
|
||||
@ -62,7 +62,7 @@ final class ContextMenuContainerNode: ASDisplayNode {
|
||||
let arrowOnBottom = maskParams.arrowOnBottom
|
||||
|
||||
path.move(to: CGPoint(x: 0.0, y: verticalInset + cornerRadius))
|
||||
path.addArc(withCenter: CGPoint(x: cornerRadius, y: verticalInset + cornerRadius), radius: cornerRadius, startAngle: CGFloat(M_PI), endAngle: CGFloat(3 * M_PI / 2), clockwise: true)
|
||||
path.addArc(withCenter: CGPoint(x: cornerRadius, y: verticalInset + cornerRadius), radius: cornerRadius, startAngle: CGFloat.pi, endAngle: CGFloat(3 * M_PI / 2), clockwise: true)
|
||||
if !arrowOnBottom {
|
||||
path.addLine(to: CGPoint(x: arrowPosition - arrowWidth / 2.0, y: verticalInset))
|
||||
path.addLine(to: CGPoint(x: arrowPosition, y: 0.0))
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import Foundation
|
||||
|
||||
public final class ImmediateTextNode: TextNode {
|
||||
public class ImmediateTextNode: TextNode {
|
||||
public var attributedText: NSAttributedString?
|
||||
public var textAlignment: NSTextAlignment = .natural
|
||||
public var maximumNumberOfLines: Int = 1
|
||||
|
||||
@ -164,7 +164,7 @@ public final class PeekControllerGestureRecognizer: UIPanGestureRecognizer {
|
||||
override public func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent) {
|
||||
super.touchesEnded(touches, with: event)
|
||||
|
||||
if self.activateBySingleTap, candidateContent != nil {
|
||||
if self.activateBySingleTap, self.candidateContent != nil, self.presentedController == nil {
|
||||
self.longTapTimerFired()
|
||||
self.pressTimerFired()
|
||||
} else {
|
||||
|
||||
@ -118,9 +118,9 @@ final class PeekControllerNode: ViewControllerTracingNode {
|
||||
var containerFrame: CGRect
|
||||
switch self.content.presentation() {
|
||||
case .contained:
|
||||
containerFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - contentSize.width) / 2.0), y: self.containerOffset + floor((layout.size.height - contentSize.height) / 2.0)), size: contentSize)
|
||||
containerFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - contentSize.width) / 2.0), y: floor((layout.size.height - contentSize.height) / 2.0)), size: contentSize)
|
||||
case .freeform:
|
||||
containerFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - contentSize.width) / 2.0), y: self.containerOffset + floor((layout.size.height - contentSize.height) / 4.0)), size: contentSize)
|
||||
containerFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - contentSize.width) / 2.0), y: floor((layout.size.height - contentSize.height) / 4.0)), size: contentSize)
|
||||
}
|
||||
|
||||
if let menuNode = self.menuNode {
|
||||
@ -131,17 +131,23 @@ final class PeekControllerNode: ViewControllerTracingNode {
|
||||
if self.displayingMenu {
|
||||
let upperBound = layout.size.height - layoutInsets.bottom - menuHeight - 14.0 * 2.0 - containerFrame.height
|
||||
if containerFrame.origin.y > upperBound {
|
||||
var offset = upperBound - containerFrame.origin.y
|
||||
let delta = abs(offset)
|
||||
let factor: CGFloat = 60.0
|
||||
offset = (-((1.0 - (1.0 / (((delta) * 0.55 / (factor)) + 1.0))) * factor)) * (offset < 0.0 ? 1.0 : -1.0)
|
||||
containerFrame.origin.y = upperBound - offset
|
||||
containerFrame.origin.y = upperBound
|
||||
}
|
||||
|
||||
transition.updateAlpha(layer: self.blurView.layer, alpha: 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
if self.displayingMenu {
|
||||
var offset = self.containerOffset
|
||||
let delta = abs(offset)
|
||||
let factor: CGFloat = 60.0
|
||||
offset = (-((1.0 - (1.0 / (((delta) * 0.55 / (factor)) + 1.0))) * factor)) * (offset < 0.0 ? 1.0 : -1.0)
|
||||
containerFrame = containerFrame.offsetBy(dx: 0.0, dy: offset)
|
||||
} else {
|
||||
containerFrame = containerFrame.offsetBy(dx: 0.0, dy: self.containerOffset)
|
||||
}
|
||||
|
||||
transition.updateFrame(node: self.containerNode, frame: containerFrame)
|
||||
|
||||
if let menuNode = self.menuNode, let menuSize = menuSize {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user