Refactoring

This commit is contained in:
Ali
2021-09-07 13:09:06 +04:00
parent f0f02dc4b9
commit 1141e09c1b
257 changed files with 1894 additions and 1720 deletions

View File

@@ -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)
}
}