mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Gifts improvements
This commit is contained in:
@@ -237,6 +237,8 @@ private final class StarsPurchaseScreenContentComponent: CombinedComponent {
|
||||
textString = renew ? strings.Stars_Purchase_SubscriptionRenewInfo(component.peers.first?.value.compactDisplayTitle ?? "").string : strings.Stars_Purchase_SubscriptionInfo(component.peers.first?.value.compactDisplayTitle ?? "").string
|
||||
case .unlockMedia:
|
||||
textString = strings.Stars_Purchase_StarsNeededUnlockInfo
|
||||
case .starGift:
|
||||
textString = strings.Stars_Purchase_StarGiftInfo(component.peers.first?.value.compactDisplayTitle ?? "").string
|
||||
}
|
||||
|
||||
let markdownAttributes = MarkdownAttributes(body: MarkdownAttributeSet(font: textFont, textColor: textColor), bold: MarkdownAttributeSet(font: boldTextFont, textColor: textColor), link: MarkdownAttributeSet(font: textFont, textColor: accentColor), linkAttribute: { contents in
|
||||
@@ -815,11 +817,9 @@ private final class StarsPurchaseScreenComponent: CombinedComponent {
|
||||
switch context.component.purpose {
|
||||
case .generic:
|
||||
titleText = strings.Stars_Purchase_GetStars
|
||||
case let .topUp(requiredStars, _):
|
||||
titleText = strings.Stars_Purchase_StarsNeeded(Int32(requiredStars))
|
||||
case .gift:
|
||||
titleText = strings.Stars_Purchase_GiftStars
|
||||
case let .transfer(_, requiredStars), let .reactions(_, requiredStars), let .subscription(_, requiredStars, _), let .unlockMedia(requiredStars):
|
||||
case let .topUp(requiredStars, _), let .transfer(_, requiredStars), let .reactions(_, requiredStars), let .subscription(_, requiredStars, _), let .unlockMedia(requiredStars), let .starGift(_, requiredStars):
|
||||
titleText = strings.Stars_Purchase_StarsNeeded(Int32(requiredStars))
|
||||
}
|
||||
|
||||
@@ -1239,6 +1239,8 @@ private extension StarsPurchasePurpose {
|
||||
return [peerId]
|
||||
case let .subscription(peerId, _, _):
|
||||
return [peerId]
|
||||
case let .starGift(peerId, _):
|
||||
return [peerId]
|
||||
default:
|
||||
return []
|
||||
}
|
||||
@@ -1256,6 +1258,8 @@ private extension StarsPurchasePurpose {
|
||||
return requiredStars
|
||||
case let .unlockMedia(requiredStars):
|
||||
return requiredStars
|
||||
case let .starGift(_, requiredStars):
|
||||
return requiredStars
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user