mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
0bb02041e8
commit
b2b1b954f0
@ -2434,7 +2434,11 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
|
||||
if case let .peer(peerId) = item.chatLocation, (peerId == replyMessage?.id.peerId || item.message.threadId == 1 || item.associatedData.isRecentActions), let channel = item.message.peers[item.message.id.peerId] as? TelegramChannel, channel.flags.contains(.isForum), item.message.associatedThreadInfo != nil {
|
||||
hasThreadInfo = true
|
||||
} else if case let .customChatContents(contents) = item.associatedData.subject, case .hashTagSearch = contents.kind {
|
||||
hasThreadInfo = true
|
||||
if let channel = item.message.peers[item.message.id.peerId] as? TelegramChannel, case .broadcast = channel.info {
|
||||
|
||||
} else {
|
||||
hasThreadInfo = true
|
||||
}
|
||||
}
|
||||
|
||||
var hasReply = replyMessage != nil || replyForward != nil || replyStory != nil
|
||||
|
@ -211,11 +211,18 @@ private final class StarsTransactionSheetContent: CombinedComponent {
|
||||
buttonText = strings.Common_OK
|
||||
|
||||
if count < 0 {
|
||||
descriptionText = "- \(count * -1) ⭐️"
|
||||
descriptionText = " - \(count * -1) # "
|
||||
} else {
|
||||
descriptionText = "+ \(count) ⭐️"
|
||||
descriptionText = " + \(count) # "
|
||||
}
|
||||
|
||||
let descriptionAttributedText = NSMutableAttributedString(string: descriptionText, font: Font.semibold(18.0), textColor: descriptionText.hasPrefix("-") ? theme.list.itemDestructiveColor : theme.list.itemDisclosureActions.constructive.fillColor)
|
||||
if let range = descriptionAttributedText.string.range(of: "#"), let chevronImage = generateTintedImage(image: UIImage(bundleImageName: "Item List/PremiumIcon"), color: UIColor(rgb: 0xf09903)) {
|
||||
descriptionAttributedText.addAttribute(.attachment, value: chevronImage, range: NSRange(range, in: descriptionAttributedText.string))
|
||||
descriptionAttributedText.addAttribute(.foregroundColor, value: UIColor(rgb: 0xf09903), range: NSRange(range, in: descriptionAttributedText.string))
|
||||
descriptionAttributedText.addAttribute(.baselineOffset, value: 2.0, range: NSRange(range, in: descriptionAttributedText.string))
|
||||
}
|
||||
|
||||
let title = title.update(
|
||||
component: MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
@ -249,7 +256,7 @@ private final class StarsTransactionSheetContent: CombinedComponent {
|
||||
|
||||
let description = description.update(
|
||||
component: BalancedTextComponent(
|
||||
text: .plain(NSAttributedString(string: descriptionText, font: Font.semibold(17.0), textColor: descriptionText.hasPrefix("-") ? theme.list.itemDestructiveColor : theme.list.itemDisclosureActions.constructive.fillColor)),
|
||||
text: .plain(descriptionAttributedText),
|
||||
horizontalAlignment: .center,
|
||||
maximumNumberOfLines: 0,
|
||||
lineSpacing: 0.2
|
||||
|
@ -258,7 +258,7 @@ final class StarsTransactionsListPanelComponent: Component {
|
||||
AnyComponentWithIdentity(id: AnyHashable(1), component: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: itemSubtitle,
|
||||
font: Font.regular(fontBaseDisplaySize),
|
||||
font: Font.regular(fontBaseDisplaySize * 16.0 / 17.0),
|
||||
textColor: environment.theme.list.itemPrimaryTextColor
|
||||
)),
|
||||
maximumNumberOfLines: 1
|
||||
@ -352,7 +352,7 @@ final class StarsTransactionsListPanelComponent: Component {
|
||||
AnyComponentWithIdentity(id: AnyHashable(1), component: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "abc",
|
||||
font: Font.regular(fontBaseDisplaySize),
|
||||
font: Font.regular(fontBaseDisplaySize * 16.0 / 17.0),
|
||||
textColor: environment.theme.list.itemPrimaryTextColor
|
||||
)),
|
||||
maximumNumberOfLines: 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user