mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Improve username setup
This commit is contained in:
@@ -191,7 +191,7 @@ final class ChatTitleView: UIView, NavigationBarTitleView {
|
||||
}
|
||||
latestIndex = range.upperBound
|
||||
|
||||
let part = String(rawText[rawText.index(rawText.startIndex, offsetBy: lowerSegmentIndex) ..< rawText.index(rawText.startIndex, offsetBy: range.upperBound)])
|
||||
let part = String(rawText[rawText.index(rawText.startIndex, offsetBy: lowerSegmentIndex) ..< rawText.index(rawText.startIndex, offsetBy: min(rawText.count, range.upperBound))])
|
||||
if index == 0 {
|
||||
segments.append(.number(count, NSAttributedString(string: part, font: textFont, textColor: textColor)))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user