diff --git a/submodules/ComposePollUI/Sources/CreatePollController.swift b/submodules/ComposePollUI/Sources/CreatePollController.swift index a18cf59863..72d7283927 100644 --- a/submodules/ComposePollUI/Sources/CreatePollController.swift +++ b/submodules/ComposePollUI/Sources/CreatePollController.swift @@ -513,7 +513,7 @@ public func createPollController(context: AccountContext, peerId: PeerId, comple } } controller.isOpaqueWhenInOverlay = true - controller.isModalWhenInOverlay = true + //controller.isModalWhenInOverlay = true controller.blocksBackgroundWhenInOverlay = true controller.experimentalSnapScrollToItem = true diff --git a/submodules/Display/Display/PresentationContext.swift b/submodules/Display/Display/PresentationContext.swift index 3f81254d34..1896af3593 100644 --- a/submodules/Display/Display/PresentationContext.swift +++ b/submodules/Display/Display/PresentationContext.swift @@ -308,7 +308,7 @@ public final class PresentationContext { for (controller, _) in self.controllers.reversed() { if controller.isModalWhenInOverlay { if modalController == nil { - modalController = controller + //modalController = controller } } if topHasOpaque { diff --git a/submodules/Display/Display/UIKitUtils.m b/submodules/Display/Display/UIKitUtils.m index ddd3184b6b..aa0ac1763e 100644 --- a/submodules/Display/Display/UIKitUtils.m +++ b/submodules/Display/Display/UIKitUtils.m @@ -88,7 +88,7 @@ CGFloat springAnimationValueAt(CABasicAnimation * _Nonnull animation, CGFloat t) return [(CASpringAnimation *)animation valueAt:t]; } -@interface CustomBlurEffect : UIBlurEffect +/*@interface CustomBlurEffect : UIBlurEffect @property (nonatomic) double blurRadius; @property (nonatomic) double colorBurnTintAlpha; @@ -108,15 +108,15 @@ CGFloat springAnimationValueAt(CABasicAnimation * _Nonnull animation, CGFloat t) + (id)effectWithStyle:(long long)arg1; -@end +@end*/ void testZoomBlurEffect(UIVisualEffect *effect) { } UIBlurEffect *makeCustomZoomBlurEffect() { - //return [UIBlurEffect effectWithStyle:UIBlurEffectStyleRegular]; + return [UIBlurEffect effectWithStyle:UIBlurEffectStyleRegular]; - NSString *string = [@[@"_", @"UI", @"Custom", @"BlurEffect"] componentsJoinedByString:@""]; + /*NSString *string = [@[@"_", @"UI", @"Custom", @"BlurEffect"] componentsJoinedByString:@""]; CustomBlurEffect *result = (CustomBlurEffect *)[NSClassFromString(string) effectWithStyle:0]; result.blurRadius = 18.0; result.zoom = 0.015; @@ -129,7 +129,7 @@ UIBlurEffect *makeCustomZoomBlurEffect() { result.scale = 0.25; } else { result.scale = 0.5; - }*/ + } - return result; + return result;*/ } diff --git a/submodules/ItemListUI/Sources/ItemListController.swift b/submodules/ItemListUI/Sources/ItemListController.swift index 82491278b5..cddec7f95b 100644 --- a/submodules/ItemListUI/Sources/ItemListController.swift +++ b/submodules/ItemListUI/Sources/ItemListController.swift @@ -230,7 +230,7 @@ open class ItemListController: ViewController, KeyShor super.init(navigationBarPresentationData: NavigationBarPresentationData(theme: NavigationBarTheme(rootControllerTheme: theme), strings: NavigationBarStrings(presentationStrings: strings))) self.isOpaqueWhenInOverlay = true - self.isModalWhenInOverlay = true + //self.isModalWhenInOverlay = true self.blocksBackgroundWhenInOverlay = true self.statusBar.statusBarStyle = theme.rootController.statusBarStyle.style diff --git a/submodules/TelegramUI/TelegramUI/ChatController.swift b/submodules/TelegramUI/TelegramUI/ChatController.swift index 63a4ab2bd1..36788365b1 100644 --- a/submodules/TelegramUI/TelegramUI/ChatController.swift +++ b/submodules/TelegramUI/TelegramUI/ChatController.swift @@ -347,7 +347,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G self.blocksBackgroundWhenInOverlay = true if let subject = subject, case .scheduledMessages = subject { - self.isModalWhenInOverlay = true + //self.isModalWhenInOverlay = true } self.navigationItem.backBarButtonItem = UIBarButtonItem(title: self.presentationData.strings.Common_Back, style: .plain, target: nil, action: nil) @@ -535,7 +535,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G guard let strongSelf = self, !actions.isEmpty else { return } - let reactions: [(String, String, String)] = [ + /*let reactions: [(String, String, String)] = [ ("😔", "Sad", "sad"), ("😳", "Surprised", "surprised"), ("😂", "Fun", "lol"), @@ -548,14 +548,14 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G ("😐", "Poker", "poker"), ("💩", "Poop", "poop"), ("😊", "Smile", "smile") - ] + ]*/ var reactionItems: [ReactionContextItem] = [] - for (value, text, name) in reactions { + /*for (value, text, name) in reactions { if let path = frameworkBundle.path(forResource: name, ofType: "tgs", inDirectory: "BuiltinReactions") { reactionItems.append(ReactionContextItem(value: value, text: text, path: path)) } - } + }*/ if Namespaces.Message.allScheduled.contains(message.id.namespace) { reactionItems = [] } @@ -4312,10 +4312,10 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G } } - if let subject = self.subject, case .scheduledMessages = subject { + /*if let subject = self.subject, case .scheduledMessages = subject { self.chatDisplayNode.animateIn() self.updateTransitionWhenPresentedAsModal?(1.0, .animated(duration: 0.5, curve: .spring)) - } + }*/ } override public func viewWillDisappear(_ animated: Bool) { @@ -7639,7 +7639,8 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G private func openScheduledMessages() { let controller = ChatControllerImpl(context: self.context, chatLocation: self.chatLocation, subject: .scheduledMessages) - self.present(controller, in: .window(.root)) + (self.navigationController as? NavigationController)?.pushViewController(controller) + //self.present(controller, in: .window(.root)) } override public func dismiss(completion: (() -> Void)? = nil) { diff --git a/submodules/TelegramUI/TelegramUI/ChatInterfaceStateNavigationButtons.swift b/submodules/TelegramUI/TelegramUI/ChatInterfaceStateNavigationButtons.swift index aee93f6cd7..c95e116af4 100644 --- a/submodules/TelegramUI/TelegramUI/ChatInterfaceStateNavigationButtons.swift +++ b/submodules/TelegramUI/TelegramUI/ChatInterfaceStateNavigationButtons.swift @@ -47,13 +47,13 @@ func leftNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Cha } } } - if let subject = subject, case .scheduledMessages = subject { + /*if let subject = subject, case .scheduledMessages = subject { if let currentButton = currentButton, currentButton.action == .dismiss { return currentButton } else { return ChatNavigationButton(action: .dismiss, buttonItem: UIBarButtonItem(title: strings.Common_Done, style: .plain, target: target, action: selector)) } - } + }*/ return nil } diff --git a/submodules/TelegramUI/TelegramUI/ChatMessageBubbleItemNode.swift b/submodules/TelegramUI/TelegramUI/ChatMessageBubbleItemNode.swift index 62704c2ec6..8086c07788 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMessageBubbleItemNode.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMessageBubbleItemNode.swift @@ -373,7 +373,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePrevewItemNode self.tapRecognizer = recognizer self.view.addGestureRecognizer(recognizer) - /*let replyRecognizer = ChatSwipeToReplyRecognizer(target: self, action: #selector(self.swipeToReplyGesture(_:))) + let replyRecognizer = ChatSwipeToReplyRecognizer(target: self, action: #selector(self.swipeToReplyGesture(_:))) replyRecognizer.shouldBegin = { [weak self] in if let strongSelf = self, let item = strongSelf.item { if strongSelf.selectionNode != nil { @@ -395,9 +395,9 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePrevewItemNode } return false } - self.view.addGestureRecognizer(replyRecognizer)*/ + self.view.addGestureRecognizer(replyRecognizer) - let reactionRecognizer = ReactionSwipeGestureRecognizer(target: nil, action: nil) + /*let reactionRecognizer = ReactionSwipeGestureRecognizer(target: nil, action: nil) self.reactionRecognizer = reactionRecognizer reactionRecognizer.availableReactions = { [weak self] in guard let strongSelf = self, let item = strongSelf.item, !item.presentationData.isPreview && !Namespaces.Message.allScheduled.contains(item.message.id.namespace) else { @@ -542,7 +542,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePrevewItemNode } } } - self.view.addGestureRecognizer(reactionRecognizer) + self.view.addGestureRecognizer(reactionRecognizer)*/ } override func asyncLayout() -> (_ item: ChatMessageItem, _ params: ListViewItemLayoutParams, _ mergedTop: ChatMessageMerge, _ mergedBottom: ChatMessageMerge, _ dateHeaderAtBottom: Bool) -> (ListViewItemNodeLayout, (ListViewItemUpdateAnimation, Bool) -> Void) { @@ -2716,7 +2716,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePrevewItemNode } @objc func swipeToReplyGesture(_ recognizer: ChatSwipeToReplyRecognizer) { - /*switch recognizer.state { + switch recognizer.state { case .began: self.currentSwipeToReplyTranslation = 0.0 if self.swipeToReplyFeedback == nil { @@ -2775,7 +2775,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePrevewItemNode } default: break - }*/ + } } private var absoluteRect: (CGRect, CGSize)?