mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various improvements
This commit is contained in:
parent
483737a5c6
commit
bb404dbbd3
@ -905,11 +905,7 @@ open class ItemListControllerNode: ASDisplayNode, ASGestureRecognizerDelegate {
|
||||
if let validLayout = self.validLayout {
|
||||
updatedNode.updateLayout(layout: validLayout.0, navigationBarHeight: validLayout.1, transition: .immediate)
|
||||
}
|
||||
if self.rightOverlayNode.supernode != nil {
|
||||
self.insertSubnode(updatedNode, aboveSubnode: self.rightOverlayNode)
|
||||
} else {
|
||||
self.insertSubnode(updatedNode, aboveSubnode: self.listNode)
|
||||
}
|
||||
self.addSubnode(updatedNode)
|
||||
updatedNode.activate()
|
||||
}
|
||||
} else {
|
||||
|
@ -123,7 +123,7 @@ public final class AnimatedTextComponent: Component {
|
||||
color: component.color
|
||||
)),
|
||||
environment: {},
|
||||
containerSize: CGSize(width: 100.0, height: 100.0)
|
||||
containerSize: CGSize(width: availableSize.width, height: 100.0)
|
||||
)
|
||||
let characterFrame = CGRect(origin: CGPoint(x: size.width, y: 0.0), size: characterSize)
|
||||
if let characterComponentView = characterView.view {
|
||||
|
@ -930,6 +930,12 @@ public class ChatMessageTextBubbleContentNode: ChatMessageBubbleContentNode {
|
||||
return ChatMessageBubbleContentTapAction(content: .copy(pre))
|
||||
} else if let code = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.Code)] as? String {
|
||||
return ChatMessageBubbleContentTapAction(content: .copy(code))
|
||||
} else if let _ = attributes[NSAttributedString.Key(rawValue: "Attribute__Blockquote")] {
|
||||
if let text = self.textNode.textNode.attributeSubstring(name: "Attribute__Blockquote", index: index) {
|
||||
return ChatMessageBubbleContentTapAction(content: .copy(text.1))
|
||||
} else {
|
||||
return ChatMessageBubbleContentTapAction(content: .none)
|
||||
}
|
||||
} else if let emoji = attributes[NSAttributedString.Key(rawValue: ChatTextInputAttributes.customEmoji.rawValue)] as? ChatTextInputTextCustomEmojiAttribute, let file = emoji.file {
|
||||
return ChatMessageBubbleContentTapAction(content: .customEmoji(file))
|
||||
} else {
|
||||
|
@ -268,6 +268,18 @@ private final class PeerInfoScreenLabeledValueItemNode: PeerInfoScreenItemNode {
|
||||
}
|
||||
}
|
||||
|
||||
self.containerNode.shouldBegin = { [weak self] point in
|
||||
guard let self else {
|
||||
return false
|
||||
}
|
||||
|
||||
if self.linkItemAtPoint(point) != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
self.containerNode.activated = { [weak self] gesture, _ in
|
||||
guard let strongSelf = self, let item = strongSelf.item, let contextAction = item.contextAction else {
|
||||
gesture.cancel()
|
||||
|
@ -2235,6 +2235,12 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
||||
return result
|
||||
}
|
||||
|
||||
if self.isSettings {
|
||||
if self.subtitleNodeRawContainer.bounds.contains(self.view.convert(point, to: self.subtitleNodeRawContainer.view)) {
|
||||
return self.subtitleNodeRawContainer.view
|
||||
}
|
||||
}
|
||||
|
||||
if let result = self.buttonsContainerNode.view.hitTest(self.view.convert(point, to: self.buttonsContainerNode.view), with: event) {
|
||||
return result
|
||||
}
|
||||
|
@ -396,6 +396,15 @@ final class AuthorizedApplicationContext {
|
||||
return
|
||||
}
|
||||
|
||||
if firstMessage.restrictionReason(platform: "ios", contentSettings: strongSelf.context.currentContentSettings.with { $0 }) != nil {
|
||||
return
|
||||
}
|
||||
if let chatPeer = firstMessage.peers[firstMessage.id.peerId] {
|
||||
if EnginePeer(chatPeer).restrictionText(platform: "ios", contentSettings: strongSelf.context.currentContentSettings.with { $0 }) != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if inAppNotificationSettings.displayPreviews {
|
||||
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
||||
strongSelf.notificationController.enqueue(ChatMessageNotificationItem(context: strongSelf.context, strings: presentationData.strings, dateTimeFormat: presentationData.dateTimeFormat, nameDisplayOrder: presentationData.nameDisplayOrder, messages: messages, threadData: threadData, tapAction: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user