mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-25 09:32:46 +00:00
Various fixes
This commit is contained in:
parent
b8aa47ec81
commit
edbdcc2f0d
@ -825,9 +825,13 @@ public final class TextFieldComponent: Component {
|
|||||||
var rightmostX = lineRect.maxX + padding
|
var rightmostX = lineRect.maxX + padding
|
||||||
let rightmostY = lineRect.minY + self.textView.textContainerInset.top
|
let rightmostY = lineRect.minY + self.textView.textContainerInset.top
|
||||||
|
|
||||||
let stringIndex = self.textView.text.index(self.textView.text.startIndex, offsetBy: lineRange.location + lineRange.length - 1)
|
let nsString = (self.textView.text as NSString)
|
||||||
if self.textView.text[stringIndex] == " " {
|
let firstLineEndRange = NSMakeRange(lineRange.location + lineRange.length - 1, 1)
|
||||||
rightmostX -= 3.0
|
if nsString.length > firstLineEndRange.location + firstLineEndRange.length {
|
||||||
|
let lastChar = nsString.substring(with: firstLineEndRange)
|
||||||
|
if lastChar == " " {
|
||||||
|
rightmostX -= 2.0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return CGPoint(x: rightmostX, y: rightmostY)
|
return CGPoint(x: rightmostX, y: rightmostY)
|
||||||
|
|||||||
@ -19381,6 +19381,8 @@ func canAddMessageReactions(message: Message) -> Bool {
|
|||||||
if story.isMention {
|
if story.isMention {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
} else if let _ = media as? TelegramMediaExpiredContent {
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user