mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 17:30:12 +00:00
Merge commit '237f86f7ca9e6eca184f73abc9ab3b648fd3583e'
This commit is contained in:
commit
48c2c2f6ee
@ -7891,3 +7891,5 @@ Sorry for the inconvenience.";
|
|||||||
"Conversation.VoiceMessagesRestricted" = "%@ doesn't accept voice and video messages";
|
"Conversation.VoiceMessagesRestricted" = "%@ doesn't accept voice and video messages";
|
||||||
|
|
||||||
"Emoji.ClearRecent" = "Clear Recent Emoji";
|
"Emoji.ClearRecent" = "Clear Recent Emoji";
|
||||||
|
|
||||||
|
"Premium.AnimatedEmoji.Proceed" = "Unlock Animated Emoji";
|
||||||
|
|||||||
@ -44,19 +44,23 @@ private func getCoveringViewSnaphot(window: Window1) -> UIImage? {
|
|||||||
context.clear(CGRect(origin: CGPoint(), size: size))
|
context.clear(CGRect(origin: CGPoint(), size: size))
|
||||||
context.scaleBy(x: scale, y: scale)
|
context.scaleBy(x: scale, y: scale)
|
||||||
UIGraphicsPushContext(context)
|
UIGraphicsPushContext(context)
|
||||||
|
|
||||||
|
window.badgeView.alpha = 0.0
|
||||||
window.forEachViewController({ controller in
|
window.forEachViewController({ controller in
|
||||||
if let controller = controller as? PasscodeEntryController {
|
if let controller = controller as? PasscodeEntryController {
|
||||||
controller.displayNode.alpha = 0.0
|
controller.displayNode.alpha = 0.0
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
window.hostView.containerView.drawHierarchy(in: CGRect(origin: CGPoint(), size: unscaledSize), afterScreenUpdates: false)
|
window.hostView.containerView.drawHierarchy(in: CGRect(origin: CGPoint(), size: unscaledSize), afterScreenUpdates: true)
|
||||||
window.forEachViewController({ controller in
|
window.forEachViewController({ controller in
|
||||||
if let controller = controller as? PasscodeEntryController {
|
if let controller = controller as? PasscodeEntryController {
|
||||||
controller.displayNode.alpha = 1.0
|
controller.displayNode.alpha = 1.0
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
|
window.badgeView.alpha = 1.0
|
||||||
|
|
||||||
UIGraphicsPopContext()
|
UIGraphicsPopContext()
|
||||||
}).flatMap(applyScreenshotEffectToImage)
|
}).flatMap(applyScreenshotEffectToImage)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -357,7 +357,7 @@ final class InnerTextSelectionTipContainerNode: ASDisplayNode {
|
|||||||
private let targetSelectionIndex: Int?
|
private let targetSelectionIndex: Int?
|
||||||
|
|
||||||
private var action: (() -> Void)?
|
private var action: (() -> Void)?
|
||||||
var requestDismiss: () -> Void = {}
|
var requestDismiss: (@escaping () -> Void) -> Void = { _ in }
|
||||||
|
|
||||||
init(presentationData: PresentationData, tip: ContextController.Tip) {
|
init(presentationData: PresentationData, tip: ContextController.Tip) {
|
||||||
self.presentationData = presentationData
|
self.presentationData = presentationData
|
||||||
@ -369,8 +369,8 @@ final class InnerTextSelectionTipContainerNode: ASDisplayNode {
|
|||||||
self.buttonNode = HighlightTrackingButtonNode()
|
self.buttonNode = HighlightTrackingButtonNode()
|
||||||
|
|
||||||
self.textNode = TextNodeWithEntities()
|
self.textNode = TextNodeWithEntities()
|
||||||
|
self.textNode.textNode.displaysAsynchronously = false
|
||||||
self.textNode.textNode.isUserInteractionEnabled = false
|
self.textNode.textNode.isUserInteractionEnabled = false
|
||||||
self.textNode.textNode.displaysAsynchronously = true
|
|
||||||
|
|
||||||
var isUserInteractionEnabled = false
|
var isUserInteractionEnabled = false
|
||||||
var icon: UIImage?
|
var icon: UIImage?
|
||||||
@ -400,7 +400,7 @@ final class InnerTextSelectionTipContainerNode: ASDisplayNode {
|
|||||||
self.arguments = arguments
|
self.arguments = arguments
|
||||||
self.file = file
|
self.file = file
|
||||||
self.targetSelectionIndex = nil
|
self.targetSelectionIndex = nil
|
||||||
icon = nil //UIImage(bundleImageName: "Chat/Context Menu/Arrow")
|
icon = nil
|
||||||
isUserInteractionEnabled = text != nil
|
isUserInteractionEnabled = text != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,8 +467,9 @@ final class InnerTextSelectionTipContainerNode: ASDisplayNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@objc func pressed() {
|
@objc func pressed() {
|
||||||
self.requestDismiss()
|
self.requestDismiss({
|
||||||
self.action?()
|
self.action?()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateLayout(widthClass: ContainerViewLayoutSizeClass, width: CGFloat, transition: ContainedViewLayoutTransition) -> CGSize {
|
func updateLayout(widthClass: ContainerViewLayoutSizeClass, width: CGFloat, transition: ContainedViewLayoutTransition) -> CGSize {
|
||||||
@ -652,8 +653,8 @@ final class ContextActionsContainerNode: ASDisplayNode {
|
|||||||
self.actionsNode = InnerActionsContainerNode(presentationData: presentationData, items: itemList, getController: getController, actionSelected: actionSelected, requestLayout: requestLayout, feedbackTap: feedbackTap, blurBackground: blurBackground)
|
self.actionsNode = InnerActionsContainerNode(presentationData: presentationData, items: itemList, getController: getController, actionSelected: actionSelected, requestLayout: requestLayout, feedbackTap: feedbackTap, blurBackground: blurBackground)
|
||||||
if let tip = items.tip {
|
if let tip = items.tip {
|
||||||
let textSelectionTipNode = InnerTextSelectionTipContainerNode(presentationData: presentationData, tip: tip)
|
let textSelectionTipNode = InnerTextSelectionTipContainerNode(presentationData: presentationData, tip: tip)
|
||||||
textSelectionTipNode.requestDismiss = {
|
textSelectionTipNode.requestDismiss = { completion in
|
||||||
getController()?.dismiss(completion: nil)
|
getController()?.dismiss(completion: completion)
|
||||||
}
|
}
|
||||||
self.textSelectionTipNode = textSelectionTipNode
|
self.textSelectionTipNode = textSelectionTipNode
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -2396,6 +2396,7 @@ public final class ContextController: ViewController, StandalonePresentableContr
|
|||||||
public func setItems(_ items: Signal<ContextController.Items, NoError>, minHeight: ContextController.ActionsHeight?) {
|
public func setItems(_ items: Signal<ContextController.Items, NoError>, minHeight: ContextController.ActionsHeight?) {
|
||||||
self.items = items
|
self.items = items
|
||||||
if self.isNodeLoaded {
|
if self.isNodeLoaded {
|
||||||
|
self.immediateItemsTransitionAnimation = false
|
||||||
self.controllerNode.setItemsSignal(items: items, minHeight: minHeight, previousActionsTransition: .scale)
|
self.controllerNode.setItemsSignal(items: items, minHeight: minHeight, previousActionsTransition: .scale)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -887,8 +887,8 @@ final class ContextControllerActionsStackNode: ASDisplayNode {
|
|||||||
if self.tipNode == nil {
|
if self.tipNode == nil {
|
||||||
updatedTransition = .immediate
|
updatedTransition = .immediate
|
||||||
let tipNode = InnerTextSelectionTipContainerNode(presentationData: presentationData, tip: tip)
|
let tipNode = InnerTextSelectionTipContainerNode(presentationData: presentationData, tip: tip)
|
||||||
tipNode.requestDismiss = { [weak self] in
|
tipNode.requestDismiss = { [weak self] completion in
|
||||||
self?.getController()?.dismiss(completion: nil)
|
self?.getController()?.dismiss(completion: completion)
|
||||||
}
|
}
|
||||||
self.tipNode = tipNode
|
self.tipNode = tipNode
|
||||||
}
|
}
|
||||||
@ -997,6 +997,7 @@ final class ContextControllerActionsStackNode: ASDisplayNode {
|
|||||||
if animated {
|
if animated {
|
||||||
self.dismissingItemContainers.append((itemContainer, false))
|
self.dismissingItemContainers.append((itemContainer, false))
|
||||||
} else {
|
} else {
|
||||||
|
itemContainer.tipNode?.removeFromSupernode()
|
||||||
itemContainer.removeFromSupernode()
|
itemContainer.removeFromSupernode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1198,6 +1199,7 @@ final class ContextControllerActionsStackNode: ASDisplayNode {
|
|||||||
itemContainer?.removeFromSupernode()
|
itemContainer?.removeFromSupernode()
|
||||||
})
|
})
|
||||||
if let tipNode = itemContainer.tipNode {
|
if let tipNode = itemContainer.tipNode {
|
||||||
|
transition.updateFrame(node: tipNode, frame: CGRect(origin: CGPoint(x: navigationContainerFrame.minX, y: navigationContainerFrame.maxY + tipSpacing), size: tipNode.frame.size), beginWithCurrentState: true)
|
||||||
transition.updateAlpha(node: tipNode, alpha: 0.0, completion: { [weak tipNode] _ in
|
transition.updateAlpha(node: tipNode, alpha: 0.0, completion: { [weak tipNode] _ in
|
||||||
tipNode?.removeFromSupernode()
|
tipNode?.removeFromSupernode()
|
||||||
})
|
})
|
||||||
|
|||||||
@ -358,40 +358,9 @@ open class NavigationController: UINavigationController, ContainableController,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var forceBadgeHidden = false
|
|
||||||
public func setForceBadgeHidden(_ hidden: Bool) {
|
|
||||||
guard hidden != self.forceBadgeHidden else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
self.forceBadgeHidden = hidden
|
|
||||||
if let layout = self.validLayout {
|
|
||||||
self.updateBadgeVisibility(layout: layout)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func updateBadgeVisibility(layout: ContainerViewLayout) {
|
|
||||||
guard let badgeNode = self.badgeNode else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let badgeIsHidden = !layout.deviceMetrics.hasTopNotch || self.forceBadgeHidden || layout.size.width > layout.size.height
|
|
||||||
if badgeIsHidden != badgeNode.isHidden && !badgeIsHidden {
|
|
||||||
Queue.mainQueue().after(0.3) {
|
|
||||||
badgeNode.isHidden = badgeIsHidden
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
badgeNode.isHidden = badgeIsHidden
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func updateContainers(layout rawLayout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
private func updateContainers(layout rawLayout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||||
self.isUpdatingContainers = true
|
self.isUpdatingContainers = true
|
||||||
|
|
||||||
if let badgeNode = self.badgeNode, let image = badgeNode.image {
|
|
||||||
self.updateBadgeVisibility(layout: rawLayout)
|
|
||||||
badgeNode.frame = CGRect(origin: CGPoint(x: floorToScreenPixels((rawLayout.size.width - image.size.width) / 2.0), y: 6.0), size: image.size)
|
|
||||||
}
|
|
||||||
|
|
||||||
var layout = rawLayout
|
var layout = rawLayout
|
||||||
|
|
||||||
if self.ignoreInputHeight {
|
if self.ignoreInputHeight {
|
||||||
@ -1268,16 +1237,8 @@ open class NavigationController: UINavigationController, ContainableController,
|
|||||||
self.displayNode.addSubnode(inCallStatusBar)
|
self.displayNode.addSubnode(inCallStatusBar)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let badgeNode = ASImageNode()
|
|
||||||
badgeNode.displaysAsynchronously = false
|
|
||||||
badgeNode.image = UIImage(bundleImageName: "Components/AppBadge")
|
|
||||||
self.badgeNode = badgeNode
|
|
||||||
self.displayNode.addSubnode(badgeNode)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private var badgeNode: ASImageNode?
|
|
||||||
|
|
||||||
public func pushViewController(_ controller: ViewController) {
|
public func pushViewController(_ controller: ViewController) {
|
||||||
self.pushViewController(controller, completion: {})
|
self.pushViewController(controller, completion: {})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -240,6 +240,7 @@ public final class WindowKeyboardGestureRecognizerDelegate: NSObject, UIGestureR
|
|||||||
|
|
||||||
public class Window1 {
|
public class Window1 {
|
||||||
public let hostView: WindowHostView
|
public let hostView: WindowHostView
|
||||||
|
public let badgeView: UIImageView
|
||||||
|
|
||||||
private var deviceMetrics: DeviceMetrics
|
private var deviceMetrics: DeviceMetrics
|
||||||
|
|
||||||
@ -328,6 +329,9 @@ public class Window1 {
|
|||||||
|
|
||||||
public init(hostView: WindowHostView, statusBarHost: StatusBarHost?) {
|
public init(hostView: WindowHostView, statusBarHost: StatusBarHost?) {
|
||||||
self.hostView = hostView
|
self.hostView = hostView
|
||||||
|
self.badgeView = UIImageView()
|
||||||
|
self.badgeView.image = UIImage(bundleImageName: "Components/AppBadge")
|
||||||
|
|
||||||
self.systemUserInterfaceStyle = hostView.systemUserInterfaceStyle
|
self.systemUserInterfaceStyle = hostView.systemUserInterfaceStyle
|
||||||
|
|
||||||
let boundsSize = self.hostView.eventView.bounds.size
|
let boundsSize = self.hostView.eventView.bounds.size
|
||||||
@ -626,6 +630,7 @@ public class Window1 {
|
|||||||
}
|
}
|
||||||
self.windowPanRecognizer = recognizer
|
self.windowPanRecognizer = recognizer
|
||||||
self.hostView.containerView.addGestureRecognizer(recognizer)
|
self.hostView.containerView.addGestureRecognizer(recognizer)
|
||||||
|
self.hostView.containerView.addSubview(self.badgeView)
|
||||||
}
|
}
|
||||||
|
|
||||||
public required init(coder aDecoder: NSCoder) {
|
public required init(coder aDecoder: NSCoder) {
|
||||||
@ -650,6 +655,26 @@ public class Window1 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var forceBadgeHidden = false
|
||||||
|
public func setForceBadgeHidden(_ hidden: Bool) {
|
||||||
|
guard hidden != self.forceBadgeHidden else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
self.forceBadgeHidden = hidden
|
||||||
|
self.updateBadgeVisibility(layout: self.windowLayout)
|
||||||
|
}
|
||||||
|
|
||||||
|
private func updateBadgeVisibility(layout: WindowLayout) {
|
||||||
|
let badgeIsHidden = !self.deviceMetrics.hasTopNotch || self.forceBadgeHidden || layout.size.width > layout.size.height
|
||||||
|
if badgeIsHidden != self.badgeView.isHidden && !badgeIsHidden {
|
||||||
|
Queue.mainQueue().after(0.3) {
|
||||||
|
self.badgeView.isHidden = badgeIsHidden
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
self.badgeView.isHidden = badgeIsHidden
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public func setForceInCallStatusBar(_ forceInCallStatusBarText: String?, transition: ContainedViewLayoutTransition = .animated(duration: 0.3, curve: .easeInOut)) {
|
public func setForceInCallStatusBar(_ forceInCallStatusBarText: String?, transition: ContainedViewLayoutTransition = .animated(duration: 0.3, curve: .easeInOut)) {
|
||||||
if self.forceInCallStatusBarText != forceInCallStatusBarText {
|
if self.forceInCallStatusBarText != forceInCallStatusBarText {
|
||||||
self.forceInCallStatusBarText = forceInCallStatusBarText
|
self.forceInCallStatusBarText = forceInCallStatusBarText
|
||||||
@ -828,7 +853,7 @@ public class Window1 {
|
|||||||
if let coveringView = self.coveringView {
|
if let coveringView = self.coveringView {
|
||||||
self.hostView.containerView.insertSubview(controller.view, belowSubview: coveringView)
|
self.hostView.containerView.insertSubview(controller.view, belowSubview: coveringView)
|
||||||
} else {
|
} else {
|
||||||
self.hostView.containerView.addSubview(controller.view)
|
self.hostView.containerView.insertSubview(controller.view, belowSubview: self.badgeView)
|
||||||
}
|
}
|
||||||
|
|
||||||
if let controller = controller as? ViewController {
|
if let controller = controller as? ViewController {
|
||||||
@ -868,7 +893,7 @@ public class Window1 {
|
|||||||
if let controller = self.topPresentationContext.controllers.first {
|
if let controller = self.topPresentationContext.controllers.first {
|
||||||
self.hostView.containerView.insertSubview(coveringView, belowSubview: controller.0.displayNode.view)
|
self.hostView.containerView.insertSubview(coveringView, belowSubview: controller.0.displayNode.view)
|
||||||
} else {
|
} else {
|
||||||
self.hostView.containerView.addSubview(coveringView)
|
self.hostView.containerView.insertSubview(coveringView, belowSubview: self.badgeView)
|
||||||
}
|
}
|
||||||
if !self.windowLayout.size.width.isZero {
|
if !self.windowLayout.size.width.isZero {
|
||||||
coveringView.frame = CGRect(origin: CGPoint(), size: self.windowLayout.size)
|
coveringView.frame = CGRect(origin: CGPoint(), size: self.windowLayout.size)
|
||||||
@ -1087,6 +1112,11 @@ public class Window1 {
|
|||||||
coveringView.frame = CGRect(origin: CGPoint(), size: self.windowLayout.size)
|
coveringView.frame = CGRect(origin: CGPoint(), size: self.windowLayout.size)
|
||||||
coveringView.updateLayout(self.windowLayout.size)
|
coveringView.updateLayout(self.windowLayout.size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let image = self.badgeView.image {
|
||||||
|
self.updateBadgeVisibility(layout: self.windowLayout)
|
||||||
|
self.badgeView.frame = CGRect(origin: CGPoint(x: floorToScreenPixels((self.windowLayout.size.width - image.size.width) / 2.0), y: 6.0), size: image.size)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,8 +16,8 @@ GLfloat kColorConversion601FullRangeDefault[] = {
|
|||||||
|
|
||||||
GLfloat kColorConversion709Default[] = {
|
GLfloat kColorConversion709Default[] = {
|
||||||
1, 1, 1,
|
1, 1, 1,
|
||||||
0, -.21482, 2.12798,
|
0, -0.1873, 1.8556,
|
||||||
1.28033, -.38059, 0,
|
1.5748, -0.4681, 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
GLfloat *kColorConversion601 = kColorConversion601Default;
|
GLfloat *kColorConversion601 = kColorConversion601Default;
|
||||||
|
|||||||
@ -485,7 +485,7 @@ private final class DemoSheetContent: CombinedComponent {
|
|||||||
self.context = context
|
self.context = context
|
||||||
self.subject = subject
|
self.subject = subject
|
||||||
self.source = source
|
self.source = source
|
||||||
self.order = order ?? [.moreUpload, .fasterDownload, .voiceToText, .noAds, .uniqueReactions, .premiumStickers, .advancedChatManagement, .profileBadge, .animatedUserpics, .appIcons]
|
self.order = order ?? [.moreUpload, .fasterDownload, .voiceToText, .noAds, .uniqueReactions, .premiumStickers, .animatedEmoji, .advancedChatManagement, .profileBadge, .animatedUserpics, .appIcons]
|
||||||
self.action = action
|
self.action = action
|
||||||
self.dismiss = dismiss
|
self.dismiss = dismiss
|
||||||
}
|
}
|
||||||
@ -994,6 +994,9 @@ private final class DemoSheetContent: CombinedComponent {
|
|||||||
buttonAnimationName = "premium_unlock"
|
buttonAnimationName = "premium_unlock"
|
||||||
case .noAds:
|
case .noAds:
|
||||||
buttonText = strings.Premium_NoAds_Proceed
|
buttonText = strings.Premium_NoAds_Proceed
|
||||||
|
case .animatedEmoji:
|
||||||
|
buttonText = strings.Premium_AnimatedEmoji_Proceed
|
||||||
|
buttonAnimationName = "premium_unlock"
|
||||||
default:
|
default:
|
||||||
buttonText = strings.Common_OK
|
buttonText = strings.Common_OK
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1223,7 +1223,7 @@ public final class PremiumGiftScreen: ViewControllerComponentContainer {
|
|||||||
public weak var containerView: UIView?
|
public weak var containerView: UIView?
|
||||||
public var animationColor: UIColor?
|
public var animationColor: UIColor?
|
||||||
|
|
||||||
public init(context: AccountContext, peerId: PeerId) {
|
public init(context: AccountContext, peerId: PeerId, options: [CachedPremiumGiftOption]) {
|
||||||
self.context = context
|
self.context = context
|
||||||
|
|
||||||
var updateInProgressImpl: ((Bool) -> Void)?
|
var updateInProgressImpl: ((Bool) -> Void)?
|
||||||
|
|||||||
@ -36,6 +36,7 @@ public enum PremiumSource: Equatable {
|
|||||||
case accounts
|
case accounts
|
||||||
case about
|
case about
|
||||||
case appIcons
|
case appIcons
|
||||||
|
case animatedEmoji
|
||||||
case deeplink(String?)
|
case deeplink(String?)
|
||||||
case profile(PeerId)
|
case profile(PeerId)
|
||||||
case gift(from: PeerId, to: PeerId, duration: Int32)
|
case gift(from: PeerId, to: PeerId, duration: Int32)
|
||||||
@ -73,6 +74,8 @@ public enum PremiumSource: Equatable {
|
|||||||
return "double_limits__accounts"
|
return "double_limits__accounts"
|
||||||
case .about:
|
case .about:
|
||||||
return "double_limits__about"
|
return "double_limits__about"
|
||||||
|
case .animatedEmoji:
|
||||||
|
return "animated_emoji"
|
||||||
case let .profile(id):
|
case let .profile(id):
|
||||||
return "profile__\(id.id._internalGetInt64Value())"
|
return "profile__\(id.id._internalGetInt64Value())"
|
||||||
case .gift, .giftTerms:
|
case .gift, .giftTerms:
|
||||||
|
|||||||
@ -769,6 +769,9 @@ public func privacyAndSecurityController(context: AccountContext, initialSetting
|
|||||||
}), true)
|
}), true)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
let hapticFeedback = HapticFeedback()
|
||||||
|
hapticFeedback.impact()
|
||||||
|
|
||||||
presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .info(title: nil, text: presentationData.strings.Privacy_VoiceMessages_Tooltip), elevatedLayout: false, animateInAsReplacement: false, action: { action in
|
presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .info(title: nil, text: presentationData.strings.Privacy_VoiceMessages_Tooltip), elevatedLayout: false, animateInAsReplacement: false, action: { action in
|
||||||
if action == .info {
|
if action == .info {
|
||||||
let controller = PremiumIntroScreen(context: context, source: .settings)
|
let controller = PremiumIntroScreen(context: context, source: .settings)
|
||||||
|
|||||||
@ -172,13 +172,19 @@ final class StickerPackEmojisItemNode: GridItemNode {
|
|||||||
super.didLoad()
|
super.didLoad()
|
||||||
|
|
||||||
let shimmerHostView = PortalSourceView()
|
let shimmerHostView = PortalSourceView()
|
||||||
|
shimmerHostView.alpha = 0.0
|
||||||
|
shimmerHostView.frame = CGRect(origin: CGPoint(), size: self.frame.size)
|
||||||
|
self.view.addSubview(shimmerHostView)
|
||||||
self.shimmerHostView = shimmerHostView
|
self.shimmerHostView = shimmerHostView
|
||||||
|
|
||||||
let standaloneShimmerEffect = StandaloneShimmerEffect()
|
let standaloneShimmerEffect = StandaloneShimmerEffect()
|
||||||
self.standaloneShimmerEffect = standaloneShimmerEffect
|
self.standaloneShimmerEffect = standaloneShimmerEffect
|
||||||
|
if let item = self.item {
|
||||||
shimmerHostView.alpha = 0.0
|
let shimmerBackgroundColor = item.theme.chat.inputPanel.primaryTextColor.withMultipliedAlpha(0.08)
|
||||||
self.view.addSubview(shimmerHostView)
|
let shimmerForegroundColor = item.theme.list.itemBlocksBackgroundColor.withMultipliedAlpha(0.15)
|
||||||
|
standaloneShimmerEffect.update(background: shimmerBackgroundColor, foreground: shimmerForegroundColor)
|
||||||
|
self.updateShimmerIfNeeded()
|
||||||
|
}
|
||||||
|
|
||||||
let boundsChangeTrackerLayer = SimpleLayer()
|
let boundsChangeTrackerLayer = SimpleLayer()
|
||||||
boundsChangeTrackerLayer.opacity = 0.0
|
boundsChangeTrackerLayer.opacity = 0.0
|
||||||
@ -261,7 +267,7 @@ final class StickerPackEmojisItemNode: GridItemNode {
|
|||||||
placeholderColor: theme.chat.inputPanel.primaryTextColor.withMultipliedAlpha(0.1),
|
placeholderColor: theme.chat.inputPanel.primaryTextColor.withMultipliedAlpha(0.1),
|
||||||
blurredBadgeColor: theme.chat.inputPanel.panelBackgroundColor.withMultipliedAlpha(0.5),
|
blurredBadgeColor: theme.chat.inputPanel.panelBackgroundColor.withMultipliedAlpha(0.5),
|
||||||
pointSize: itemNativeFitSize,
|
pointSize: itemNativeFitSize,
|
||||||
onUpdateDisplayPlaceholder: { [weak self] displayPlaceholder, _ in
|
onUpdateDisplayPlaceholder: { [weak self] displayPlaceholder, duration in
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -275,7 +281,7 @@ final class StickerPackEmojisItemNode: GridItemNode {
|
|||||||
context: context,
|
context: context,
|
||||||
file: item.file,
|
file: item.file,
|
||||||
shimmerView: strongSelf.shimmerHostView,
|
shimmerView: strongSelf.shimmerHostView,
|
||||||
color: nil,
|
color: theme.chat.inputPanel.primaryTextColor.withMultipliedAlpha(0.08),
|
||||||
size: itemNativeFitSize
|
size: itemNativeFitSize
|
||||||
)
|
)
|
||||||
strongSelf.visibleItemPlaceholderViews[itemId] = placeholderView
|
strongSelf.visibleItemPlaceholderViews[itemId] = placeholderView
|
||||||
@ -289,9 +295,20 @@ final class StickerPackEmojisItemNode: GridItemNode {
|
|||||||
} else {
|
} else {
|
||||||
if let placeholderView = strongSelf.visibleItemPlaceholderViews[itemId] {
|
if let placeholderView = strongSelf.visibleItemPlaceholderViews[itemId] {
|
||||||
strongSelf.visibleItemPlaceholderViews.removeValue(forKey: itemId)
|
strongSelf.visibleItemPlaceholderViews.removeValue(forKey: itemId)
|
||||||
placeholderView.removeFromSuperview()
|
|
||||||
|
|
||||||
|
if duration > 0.0 {
|
||||||
|
placeholderView.layer.opacity = 0.0
|
||||||
|
placeholderView.layer.animateAlpha(from: 1.0, to: 0.0, duration: duration, completion: { [weak self, weak placeholderView] _ in
|
||||||
|
guard let strongSelf = self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
placeholderView?.removeFromSuperview()
|
||||||
strongSelf.updateShimmerIfNeeded()
|
strongSelf.updateShimmerIfNeeded()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
placeholderView.removeFromSuperview()
|
||||||
|
strongSelf.updateShimmerIfNeeded()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -324,6 +341,13 @@ final class StickerPackEmojisItemNode: GridItemNode {
|
|||||||
|
|
||||||
itemLayer.isVisibleForAnimations = true
|
itemLayer.isVisibleForAnimations = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for id in self.visibleItemLayers.keys {
|
||||||
|
if !validIds.contains(id) {
|
||||||
|
self.visibleItemLayers[id]?.removeFromSuperlayer()
|
||||||
|
self.visibleItemLayers[id] = nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func updateShimmerIfNeeded() {
|
private func updateShimmerIfNeeded() {
|
||||||
|
|||||||
@ -715,7 +715,7 @@ private final class StickerPackContainer: ASDisplayNode {
|
|||||||
} else if loadedCount == contents.count {
|
} else if loadedCount == contents.count {
|
||||||
self.onReady()
|
self.onReady()
|
||||||
|
|
||||||
if !contents.isEmpty && self.currentStickerPack == nil {
|
if !contents.isEmpty && self.currentStickerPacks.isEmpty {
|
||||||
if let _ = self.validLayout, abs(self.expandScrollProgress - 1.0) < .ulpOfOne {
|
if let _ = self.validLayout, abs(self.expandScrollProgress - 1.0) < .ulpOfOne {
|
||||||
scrollToItem = GridNodeScrollToItem(index: 0, position: .top(0.0), transition: .immediate, directionHint: .up, adjustForSection: false)
|
scrollToItem = GridNodeScrollToItem(index: 0, position: .top(0.0), transition: .immediate, directionHint: .up, adjustForSection: false)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,7 +78,7 @@ public final class TextNodeWithEntities {
|
|||||||
context: self.context,
|
context: self.context,
|
||||||
cache: self.cache,
|
cache: self.cache,
|
||||||
renderer: self.renderer,
|
renderer: self.renderer,
|
||||||
placeholderColor: self.placeholderColor,
|
placeholderColor: color,
|
||||||
attemptSynchronous: self.attemptSynchronous
|
attemptSynchronous: self.attemptSynchronous
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.8 KiB |
@ -3702,6 +3702,8 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
}, cancelInteractiveKeyboardGestures: { [weak self] in
|
}, cancelInteractiveKeyboardGestures: { [weak self] in
|
||||||
(self?.view.window as? WindowHost)?.cancelInteractiveKeyboardGestures()
|
(self?.view.window as? WindowHost)?.cancelInteractiveKeyboardGestures()
|
||||||
self?.chatDisplayNode.cancelInteractiveKeyboardGestures()
|
self?.chatDisplayNode.cancelInteractiveKeyboardGestures()
|
||||||
|
}, dismissTextInput: { [weak self] in
|
||||||
|
self?.chatDisplayNode.dismissTextInput()
|
||||||
}, automaticMediaDownloadSettings: self.automaticMediaDownloadSettings, pollActionState: ChatInterfacePollActionState(), stickerSettings: self.stickerSettings, presentationContext: ChatPresentationContext(context: context, backgroundNode: self.chatBackgroundNode))
|
}, automaticMediaDownloadSettings: self.automaticMediaDownloadSettings, pollActionState: ChatInterfacePollActionState(), stickerSettings: self.stickerSettings, presentationContext: ChatPresentationContext(context: context, backgroundNode: self.chatBackgroundNode))
|
||||||
|
|
||||||
self.controllerInteraction = controllerInteraction
|
self.controllerInteraction = controllerInteraction
|
||||||
|
|||||||
@ -141,6 +141,7 @@ public final class ChatControllerInteraction {
|
|||||||
|
|
||||||
let requestMessageUpdate: (MessageId) -> Void
|
let requestMessageUpdate: (MessageId) -> Void
|
||||||
let cancelInteractiveKeyboardGestures: () -> Void
|
let cancelInteractiveKeyboardGestures: () -> Void
|
||||||
|
let dismissTextInput: () -> Void
|
||||||
|
|
||||||
var canPlayMedia: Bool = false
|
var canPlayMedia: Bool = false
|
||||||
var hiddenMedia: [MessageId: [Media]] = [:]
|
var hiddenMedia: [MessageId: [Media]] = [:]
|
||||||
@ -243,6 +244,7 @@ public final class ChatControllerInteraction {
|
|||||||
openWebView: @escaping (String, String, Bool, Bool) -> Void,
|
openWebView: @escaping (String, String, Bool, Bool) -> Void,
|
||||||
requestMessageUpdate: @escaping (MessageId) -> Void,
|
requestMessageUpdate: @escaping (MessageId) -> Void,
|
||||||
cancelInteractiveKeyboardGestures: @escaping () -> Void,
|
cancelInteractiveKeyboardGestures: @escaping () -> Void,
|
||||||
|
dismissTextInput: @escaping () -> Void,
|
||||||
automaticMediaDownloadSettings: MediaAutoDownloadSettings,
|
automaticMediaDownloadSettings: MediaAutoDownloadSettings,
|
||||||
pollActionState: ChatInterfacePollActionState,
|
pollActionState: ChatInterfacePollActionState,
|
||||||
stickerSettings: ChatInterfaceStickerSettings,
|
stickerSettings: ChatInterfaceStickerSettings,
|
||||||
@ -330,6 +332,7 @@ public final class ChatControllerInteraction {
|
|||||||
self.openWebView = openWebView
|
self.openWebView = openWebView
|
||||||
self.requestMessageUpdate = requestMessageUpdate
|
self.requestMessageUpdate = requestMessageUpdate
|
||||||
self.cancelInteractiveKeyboardGestures = cancelInteractiveKeyboardGestures
|
self.cancelInteractiveKeyboardGestures = cancelInteractiveKeyboardGestures
|
||||||
|
self.dismissTextInput = dismissTextInput
|
||||||
|
|
||||||
self.automaticMediaDownloadSettings = automaticMediaDownloadSettings
|
self.automaticMediaDownloadSettings = automaticMediaDownloadSettings
|
||||||
|
|
||||||
|
|||||||
@ -2317,6 +2317,10 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
|||||||
self.view.window?.endEditing(true)
|
self.view.window?.endEditing(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func dismissTextInput() {
|
||||||
|
self.view.window?.endEditing(true)
|
||||||
|
}
|
||||||
|
|
||||||
func collapseInput() {
|
func collapseInput() {
|
||||||
if self.inputPanelContainerNode.expansionFraction != 0.0 {
|
if self.inputPanelContainerNode.expansionFraction != 0.0 {
|
||||||
self.inputPanelContainerNode.collapse()
|
self.inputPanelContainerNode.collapse()
|
||||||
@ -2866,10 +2870,11 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
|||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
strongSelf.dismissTextInput()
|
||||||
|
|
||||||
var replaceImpl: ((ViewController) -> Void)?
|
var replaceImpl: ((ViewController) -> Void)?
|
||||||
let controller = PremiumDemoScreen(context: strongSelf.context, subject: .premiumStickers, action: {
|
let controller = PremiumDemoScreen(context: strongSelf.context, subject: .animatedEmoji, action: {
|
||||||
let controller = PremiumIntroScreen(context: strongSelf.context, source: .stickers)
|
let controller = PremiumIntroScreen(context: strongSelf.context, source: .animatedEmoji)
|
||||||
replaceImpl?(controller)
|
replaceImpl?(controller)
|
||||||
})
|
})
|
||||||
replaceImpl = { [weak controller] c in
|
replaceImpl = { [weak controller] c in
|
||||||
|
|||||||
@ -322,8 +322,8 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var replaceImpl: ((ViewController) -> Void)?
|
var replaceImpl: ((ViewController) -> Void)?
|
||||||
let controller = PremiumDemoScreen(context: context, subject: .premiumStickers, action: {
|
let controller = PremiumDemoScreen(context: context, subject: .animatedEmoji, action: {
|
||||||
let controller = PremiumIntroScreen(context: context, source: .stickers)
|
let controller = PremiumIntroScreen(context: context, source: .animatedEmoji)
|
||||||
replaceImpl?(controller)
|
replaceImpl?(controller)
|
||||||
})
|
})
|
||||||
replaceImpl = { [weak controller] c in
|
replaceImpl = { [weak controller] c in
|
||||||
@ -1765,8 +1765,8 @@ final class EntityInputView: UIView, AttachmentTextInputPanelInputView, UIInputV
|
|||||||
}
|
}
|
||||||
|
|
||||||
var replaceImpl: ((ViewController) -> Void)?
|
var replaceImpl: ((ViewController) -> Void)?
|
||||||
let controller = PremiumDemoScreen(context: strongSelf.context, subject: .premiumStickers, action: {
|
let controller = PremiumDemoScreen(context: strongSelf.context, subject: .animatedEmoji, action: {
|
||||||
let controller = PremiumIntroScreen(context: strongSelf.context, source: .stickers)
|
let controller = PremiumIntroScreen(context: strongSelf.context, source: .animatedEmoji)
|
||||||
replaceImpl?(controller)
|
replaceImpl?(controller)
|
||||||
})
|
})
|
||||||
replaceImpl = { [weak controller] c in
|
replaceImpl = { [weak controller] c in
|
||||||
|
|||||||
@ -537,6 +537,7 @@ final class ChatRecentActionsControllerNode: ViewControllerTracingNode {
|
|||||||
}, openWebView: { _, _, _, _ in
|
}, openWebView: { _, _, _, _ in
|
||||||
}, requestMessageUpdate: { _ in
|
}, requestMessageUpdate: { _ in
|
||||||
}, cancelInteractiveKeyboardGestures: {
|
}, cancelInteractiveKeyboardGestures: {
|
||||||
|
}, dismissTextInput: {
|
||||||
}, automaticMediaDownloadSettings: self.automaticMediaDownloadSettings,
|
}, automaticMediaDownloadSettings: self.automaticMediaDownloadSettings,
|
||||||
pollActionState: ChatInterfacePollActionState(), stickerSettings: ChatInterfaceStickerSettings(loopAnimatedStickers: false), presentationContext: ChatPresentationContext(context: context, backgroundNode: self.backgroundNode))
|
pollActionState: ChatInterfacePollActionState(), stickerSettings: ChatInterfaceStickerSettings(loopAnimatedStickers: false), presentationContext: ChatPresentationContext(context: context, backgroundNode: self.backgroundNode))
|
||||||
self.controllerInteraction = controllerInteraction
|
self.controllerInteraction = controllerInteraction
|
||||||
|
|||||||
@ -163,6 +163,7 @@ private final class DrawingStickersScreenNode: ViewControllerTracingNode {
|
|||||||
}, openWebView: { _, _, _, _ in
|
}, openWebView: { _, _, _, _ in
|
||||||
}, requestMessageUpdate: { _ in
|
}, requestMessageUpdate: { _ in
|
||||||
}, cancelInteractiveKeyboardGestures: {
|
}, cancelInteractiveKeyboardGestures: {
|
||||||
|
}, dismissTextInput: {
|
||||||
}, automaticMediaDownloadSettings: MediaAutoDownloadSettings.defaultSettings,
|
}, automaticMediaDownloadSettings: MediaAutoDownloadSettings.defaultSettings,
|
||||||
pollActionState: ChatInterfacePollActionState(), stickerSettings: ChatInterfaceStickerSettings(loopAnimatedStickers: true), presentationContext: ChatPresentationContext(context: context, backgroundNode: nil))
|
pollActionState: ChatInterfacePollActionState(), stickerSettings: ChatInterfaceStickerSettings(loopAnimatedStickers: true), presentationContext: ChatPresentationContext(context: context, backgroundNode: nil))
|
||||||
|
|
||||||
|
|||||||
@ -155,6 +155,7 @@ final class OverlayAudioPlayerControllerNode: ViewControllerTracingNode, UIGestu
|
|||||||
}, openWebView: { _, _, _, _ in
|
}, openWebView: { _, _, _, _ in
|
||||||
}, requestMessageUpdate: { _ in
|
}, requestMessageUpdate: { _ in
|
||||||
}, cancelInteractiveKeyboardGestures: {
|
}, cancelInteractiveKeyboardGestures: {
|
||||||
|
}, dismissTextInput: {
|
||||||
}, automaticMediaDownloadSettings: MediaAutoDownloadSettings.defaultSettings, pollActionState: ChatInterfacePollActionState(), stickerSettings: ChatInterfaceStickerSettings(loopAnimatedStickers: false), presentationContext: ChatPresentationContext(context: context, backgroundNode: nil))
|
}, automaticMediaDownloadSettings: MediaAutoDownloadSettings.defaultSettings, pollActionState: ChatInterfacePollActionState(), stickerSettings: ChatInterfaceStickerSettings(loopAnimatedStickers: false), presentationContext: ChatPresentationContext(context: context, backgroundNode: nil))
|
||||||
|
|
||||||
self.dimNode = ASDisplayNode()
|
self.dimNode = ASDisplayNode()
|
||||||
|
|||||||
@ -2356,6 +2356,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
}, openWebView: { _, _, _, _ in
|
}, openWebView: { _, _, _, _ in
|
||||||
}, requestMessageUpdate: { _ in
|
}, requestMessageUpdate: { _ in
|
||||||
}, cancelInteractiveKeyboardGestures: {
|
}, cancelInteractiveKeyboardGestures: {
|
||||||
|
}, dismissTextInput: {
|
||||||
}, automaticMediaDownloadSettings: MediaAutoDownloadSettings.defaultSettings,
|
}, automaticMediaDownloadSettings: MediaAutoDownloadSettings.defaultSettings,
|
||||||
pollActionState: ChatInterfacePollActionState(), stickerSettings: ChatInterfaceStickerSettings(loopAnimatedStickers: false), presentationContext: ChatPresentationContext(context: context, backgroundNode: nil))
|
pollActionState: ChatInterfacePollActionState(), stickerSettings: ChatInterfaceStickerSettings(loopAnimatedStickers: false), presentationContext: ChatPresentationContext(context: context, backgroundNode: nil))
|
||||||
self.hiddenMediaDisposable = context.sharedContext.mediaManager.galleryHiddenMediaManager.hiddenIds().start(next: { [weak self] ids in
|
self.hiddenMediaDisposable = context.sharedContext.mediaManager.galleryHiddenMediaManager.hiddenIds().start(next: { [weak self] ids in
|
||||||
@ -4064,7 +4065,11 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Gift"), color: theme.contextMenu.primaryColor)
|
generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Gift"), color: theme.contextMenu.primaryColor)
|
||||||
}, action: { [weak self] _, f in
|
}, action: { [weak self] _, f in
|
||||||
f(.dismissWithoutContent)
|
f(.dismissWithoutContent)
|
||||||
self?.giftPremium()
|
|
||||||
|
if let strongSelf = self {
|
||||||
|
let controller = PremiumGiftScreen(context: strongSelf.context, peerId: strongSelf.peerId, options: cachedData.premiumGiftOptions)
|
||||||
|
strongSelf.controller?.push(controller)
|
||||||
|
}
|
||||||
})))
|
})))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6427,11 +6432,6 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
private func giftPremium() {
|
|
||||||
let controller = PremiumGiftScreen(context: self.context, peerId: self.peerId)
|
|
||||||
self.controller?.push(controller)
|
|
||||||
}
|
|
||||||
|
|
||||||
fileprivate func switchToAccount(id: AccountRecordId) {
|
fileprivate func switchToAccount(id: AccountRecordId) {
|
||||||
self.accountsAndPeers.set(.never())
|
self.accountsAndPeers.set(.never())
|
||||||
self.context.sharedContext.switchToAccount(id: id, fromSettingsController: nil, withChatListController: nil)
|
self.context.sharedContext.switchToAccount(id: id, fromSettingsController: nil, withChatListController: nil)
|
||||||
|
|||||||
@ -1334,6 +1334,7 @@ public final class SharedAccountContextImpl: SharedAccountContext {
|
|||||||
}, openWebView: { _, _, _, _ in
|
}, openWebView: { _, _, _, _ in
|
||||||
}, requestMessageUpdate: { _ in
|
}, requestMessageUpdate: { _ in
|
||||||
}, cancelInteractiveKeyboardGestures: {
|
}, cancelInteractiveKeyboardGestures: {
|
||||||
|
}, dismissTextInput: {
|
||||||
}, automaticMediaDownloadSettings: MediaAutoDownloadSettings.defaultSettings,
|
}, automaticMediaDownloadSettings: MediaAutoDownloadSettings.defaultSettings,
|
||||||
pollActionState: ChatInterfacePollActionState(), stickerSettings: ChatInterfaceStickerSettings(loopAnimatedStickers: false), presentationContext: ChatPresentationContext(context: context, backgroundNode: backgroundNode as? WallpaperBackgroundNode))
|
pollActionState: ChatInterfacePollActionState(), stickerSettings: ChatInterfaceStickerSettings(loopAnimatedStickers: false), presentationContext: ChatPresentationContext(context: context, backgroundNode: backgroundNode as? WallpaperBackgroundNode))
|
||||||
|
|
||||||
|
|||||||
@ -76,11 +76,8 @@ public final class TelegramRootController: NavigationController {
|
|||||||
|
|
||||||
self.applicationInFocusDisposable = (context.sharedContext.applicationBindings.applicationIsActive
|
self.applicationInFocusDisposable = (context.sharedContext.applicationBindings.applicationIsActive
|
||||||
|> distinctUntilChanged
|
|> distinctUntilChanged
|
||||||
|> deliverOn(Queue.mainQueue())).start(next: { [weak self] value in
|
|> deliverOn(Queue.mainQueue())).start(next: { value in
|
||||||
guard let strongSelf = self else {
|
context.sharedContext.mainWindow?.setForceBadgeHidden(!value)
|
||||||
return
|
|
||||||
}
|
|
||||||
strongSelf.setForceBadgeHidden(!value)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -974,6 +974,8 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode {
|
|||||||
case let .sticker(_, _, _, _, _, customAction):
|
case let .sticker(_, _, _, _, _, customAction):
|
||||||
if let customAction = customAction {
|
if let customAction = customAction {
|
||||||
customAction()
|
customAction()
|
||||||
|
} else {
|
||||||
|
let _ = self.action(.undo)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
let _ = self.action(.undo)
|
let _ = self.action(.undo)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user