mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Disable features
This commit is contained in:
parent
759f1b9c02
commit
413faaa908
7 changed files with 26 additions and 25 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ open class ItemListController<Entry: ItemListNodeEntry>: 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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue