mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Refactoring
This commit is contained in:
@@ -196,7 +196,7 @@ final class VerticalListContextResultsChatInputPanelItemNode: ListViewItemNode {
|
||||
}
|
||||
if let selectedUrl = selectedUrl, let parsedUrl = URL(string: selectedUrl) {
|
||||
if let host = parsedUrl.host, !host.isEmpty {
|
||||
iconText = NSAttributedString(string: host.substring(to: host.index(after: host.startIndex)).uppercased(), font: iconFont, textColor: UIColor.white)
|
||||
iconText = NSAttributedString(string: String(host[..<host.index(after: host.startIndex)].uppercased()), font: iconFont, textColor: UIColor.white)
|
||||
}
|
||||
}
|
||||
case let .internalReference(internalReference):
|
||||
@@ -214,7 +214,7 @@ final class VerticalListContextResultsChatInputPanelItemNode: ListViewItemNode {
|
||||
|
||||
if iconText == nil {
|
||||
if let title = item.result.title, !title.isEmpty {
|
||||
let titleText = title.substring(to: title.index(after: title.startIndex)).uppercased()
|
||||
let titleText = String(title[..<title.index(after: title.startIndex)].uppercased())
|
||||
iconText = NSAttributedString(string: titleText, font: iconFont, textColor: UIColor.white)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user