mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix crash
This commit is contained in:
parent
9a1799d616
commit
674ffd7cc3
@ -19,12 +19,14 @@
|
||||
- (CGRect)lineFragmentRectForProposedRect:(CGRect)proposedRect atIndex:(NSUInteger)characterIndex writingDirection:(NSWritingDirection)baseWritingDirection remainingRect:(nullable CGRect *)remainingRect {
|
||||
CGRect result = [super lineFragmentRectForProposedRect:proposedRect atIndex:characterIndex writingDirection:baseWritingDirection remainingRect:remainingRect];
|
||||
|
||||
/*if (result.origin.y < 10.0f) {
|
||||
result.size.width -= 20.0f;
|
||||
#if DEBUG
|
||||
if (result.origin.y < 10.0f) {
|
||||
result.size.width -= 21.0f;
|
||||
if (result.size.width < 0.0f) {
|
||||
result.size.width = 0.0f;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -1579,7 +1579,7 @@ final class ChatMessageInteractiveFileNode: ASDisplayNode {
|
||||
|
||||
func updateIsExtractedToContextPreview(_ value: Bool) {
|
||||
if value {
|
||||
if self.textSelectionNode == nil, let item = self.arguments, /*!item.associatedData.isCopyProtectionEnabled && !item.message.isCopyProtected(),*/ let rootNode = item.controllerInteraction.chatControllerNode() {
|
||||
if self.textSelectionNode == nil, self.textNode.supernode != nil, let item = self.arguments, !item.associatedData.isCopyProtectionEnabled && !item.message.isCopyProtected(), let rootNode = item.controllerInteraction.chatControllerNode() {
|
||||
let selectionColor: UIColor
|
||||
let knobColor: UIColor
|
||||
if item.message.effectivelyIncoming(item.context.account.peerId) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user