mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
5a62788289
commit
a3db20c972
@ -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?
|
||||||
@ -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;
|
||||||
|
@ -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)?
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.8 KiB |
@ -211,7 +211,7 @@ 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: .stickers)
|
||||||
replaceImpl?(controller)
|
replaceImpl?(controller)
|
||||||
})
|
})
|
||||||
@ -1310,7 +1310,7 @@ 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: .stickers)
|
||||||
replaceImpl?(controller)
|
replaceImpl?(controller)
|
||||||
})
|
})
|
||||||
|
@ -4064,7 +4064,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 +6431,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)
|
||||||
|
@ -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)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user