Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-10-26 21:30:52 +04:00
parent 4fef982671
commit 616d3d0268
26 changed files with 467 additions and 223 deletions

View File

@@ -841,7 +841,7 @@ public final class InviteLinkViewController: ViewController {
self.historyBackgroundContentNode.backgroundColor = self.presentationData.theme.list.plainBackgroundColor
self.headerBackgroundNode.backgroundColor = self.presentationData.theme.list.plainBackgroundColor
self.titleNode.attributedText = NSAttributedString(string: self.presentationData.strings.InviteLink_InviteLink, font: titleFont, textColor: self.presentationData.theme.actionSheet.primaryTextColor)
self.titleNode.attributedText = NSAttributedString(string: self.titleNode.attributedText?.string ?? "", font: titleFont, textColor: self.presentationData.theme.actionSheet.primaryTextColor)
self.subtitleNode.attributedText = NSAttributedString(string: self.subtitleNode.attributedText?.string ?? "", font: subtitleFont, textColor: self.presentationData.theme.list.itemSecondaryTextColor)
let accentColor = self.presentationData.theme.actionSheet.controlAccentColor
@@ -935,6 +935,7 @@ public final class InviteLinkViewController: ViewController {
transition.updateFrame(node: self.headerBackgroundNode, frame: CGRect(x: 0.0, y: 0.0, width: layout.size.width, height: 68.0))
var titleText = self.presentationData.strings.InviteLink_InviteLink
var subtitleText = ""
var subtitleColor = self.presentationData.theme.list.itemSecondaryTextColor
@@ -970,6 +971,10 @@ public final class InviteLinkViewController: ViewController {
}
}
if let title = self.invite.title, !title.isEmpty {
titleText = title
}
self.titleNode.attributedText = NSAttributedString(string: titleText, font: Font.bold(17.0), textColor: self.presentationData.theme.actionSheet.primaryTextColor)
self.subtitleNode.attributedText = NSAttributedString(string: subtitleText, font: subtitleFont, textColor: subtitleColor)