Skip to content

Commit 6e6b5b5

Browse files
author
Isaac
committed
Merge remote-tracking branch 'refs/remotes/origin/master'
2 parents 9c60935 + 5761556 commit 6e6b5b5

File tree

6 files changed

+26
-12
lines changed

6 files changed

+26
-12
lines changed

submodules/PremiumUI/Sources/PremiumIntroScreen.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,8 @@ private final class PremiumIntroScreenContentComponent: CombinedComponent {
20492049
}
20502050
subtitle = "\(environment.strings.Gift_Options_Premium_Months(product.months))\(product.price)"
20512051
} else {
2052-
subtitle = product.price
2052+
//subtitle = product.price
2053+
subtitle = "\(environment.strings.Gift_Options_Premium_Months(product.months))\(product.price)"
20532054
}
20542055
}
20552056
if product.isCurrent {

submodules/TelegramUI/Components/Chat/ChatMessageGiftBubbleContentNode/Sources/ChatMessageGiftBubbleContentNode.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -897,10 +897,10 @@ public class ChatMessageGiftBubbleContentNode: ChatMessageBubbleContentNode {
897897
}
898898
), textAlignment: .center)
899899

900-
let (creatorButtonTitleLayout, creatorButtonTitleApply) = makeCreatorButtonTitleLayout(TextNodeLayoutArguments(attributedString: creatorButtonAttributedString, backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .middle, constrainedSize: CGSize(width: giftSize.width - 32.0, height: CGFloat.greatestFiniteMagnitude), alignment: .center, cutout: nil, insets: UIEdgeInsets()))
900+
let (creatorButtonTitleLayout, creatorButtonTitleApply) = makeCreatorButtonTitleLayout(TextNodeLayoutArguments(attributedString: creatorButtonAttributedString, backgroundColor: nil, maximumNumberOfLines: 2, truncationType: .middle, constrainedSize: CGSize(width: giftSize.width - 32.0, height: CGFloat.greatestFiniteMagnitude), alignment: .center, cutout: nil, insets: UIEdgeInsets()))
901901

902902
if modelTitle == nil && !creatorButtonTitle.isEmpty {
903-
textSpacing += 28.0
903+
textSpacing += creatorButtonTitleLayout.size.height + 13.0
904904
}
905905

906906
giftSize.height = titleLayout.size.height + textSpacing + clippedTextHeight + 164.0
@@ -909,7 +909,8 @@ public class ChatMessageGiftBubbleContentNode: ChatMessageBubbleContentNode {
909909
giftSize.height += 70.0
910910

911911
if !creatorButtonTitle.isEmpty {
912-
giftSize.height += 28.0
912+
giftSize.height += creatorButtonTitleLayout.size.height + 13.0
913+
//28.0
913914
}
914915
}
915916

@@ -1073,7 +1074,7 @@ public class ChatMessageGiftBubbleContentNode: ChatMessageBubbleContentNode {
10731074

10741075
var attributesOffsetY: CGFloat = 0.0
10751076

1076-
let creatorButtonSize = CGSize(width: creatorButtonTitleLayout.size.width + 18.0, height: 18.0)
1077+
let creatorButtonSize = CGSize(width: creatorButtonTitleLayout.size.width + 18.0, height: creatorButtonTitleLayout.size.height + 3.0)
10771078
let creatorButtonOriginY = modelTitle == nil ? titleFrame.maxY + 4.0 : clippingTextFrame.maxY + 5.0
10781079
let creatorButtonFrame = CGRect(origin: CGPoint(x: mediaBackgroundFrame.minX + floorToScreenPixels((mediaBackgroundFrame.width - creatorButtonSize.width) / 2.0), y: creatorButtonOriginY), size: creatorButtonSize)
10791080
if !creatorButtonTitle.isEmpty {

submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3262,6 +3262,7 @@ private final class GiftViewSheetContent: CombinedComponent {
32623262
)
32633263
})
32643264
} else {
3265+
let descriptionConstrainedWidth = hasDescriptionButton ? context.availableSize.width - sideInset : context.availableSize.width - sideInset * 2.0 - 50.0
32653266
let description = description.update(
32663267
component: MultilineTextComponent(
32673268
text: .plain(attributedString),
@@ -3284,7 +3285,7 @@ private final class GiftViewSheetContent: CombinedComponent {
32843285
}
32853286
}
32863287
),
3287-
availableSize: CGSize(width: context.availableSize.width - sideInset * 2.0 - 50.0, height: CGFloat.greatestFiniteMagnitude),
3288+
availableSize: CGSize(width: descriptionConstrainedWidth, height: CGFloat.greatestFiniteMagnitude),
32883289
transition: context.transition
32893290
)
32903291
descriptionSize = description.size
@@ -3311,7 +3312,7 @@ private final class GiftViewSheetContent: CombinedComponent {
33113312
animateScale: false
33123313
),
33133314
environment: {},
3314-
availableSize: CGSize(width: description.size.width + 18.0, height: 19.0),
3315+
availableSize: CGSize(width: description.size.width + 18.0, height: description.size.height + 1.0),
33153316
transition: .immediate
33163317
)
33173318
headerComponents.append({

submodules/TelegramUI/Components/PeerInfo/AffiliateProgramSetupScreen/Sources/AffiliateProgramSetupScreen.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ final class AffiliateProgramSetupScreenComponent: Component {
858858
transition: transition,
859859
component: AnyComponent(FilledRoundedRectangleComponent(
860860
color: environment.theme.list.itemBlocksBackgroundColor,
861-
cornerRadius: .value(11.0),
861+
cornerRadius: .value(26.0),
862862
smoothCorners: false
863863
)),
864864
environment: {},
@@ -882,6 +882,7 @@ final class AffiliateProgramSetupScreenComponent: Component {
882882
transition: transition,
883883
component: AnyComponent(ListSectionComponent(
884884
theme: environment.theme,
885+
style: .glass,
885886
header: AnyComponent(MultilineTextComponent(
886887
text: .plain(NSAttributedString(
887888
string: environment.strings.AffiliateSetup_SectionCommission,
@@ -952,6 +953,7 @@ final class AffiliateProgramSetupScreenComponent: Component {
952953
transition: transition,
953954
component: AnyComponent(ListSectionComponent(
954955
theme: environment.theme,
956+
style: .glass,
955957
header: AnyComponent(HStack([
956958
AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent(
957959
text: .plain(NSAttributedString(
@@ -1020,6 +1022,7 @@ final class AffiliateProgramSetupScreenComponent: Component {
10201022
transition: transition,
10211023
component: AnyComponent(ListSectionComponent(
10221024
theme: environment.theme,
1025+
style: .glass,
10231026
header: nil,
10241027
footer: AnyComponent(MultilineTextComponent(
10251028
text: .plain(NSAttributedString(
@@ -1032,6 +1035,7 @@ final class AffiliateProgramSetupScreenComponent: Component {
10321035
items: [
10331036
AnyComponentWithIdentity(id: 0, component: AnyComponent(ListActionItemComponent(
10341037
theme: environment.theme,
1038+
style: .glass,
10351039
title: AnyComponent(VStack([
10361040
AnyComponentWithIdentity(id: AnyHashable(0), component: AnyComponent(MultilineTextComponent(
10371041
text: .plain(NSAttributedString(
@@ -1070,11 +1074,13 @@ final class AffiliateProgramSetupScreenComponent: Component {
10701074
transition: transition,
10711075
component: AnyComponent(ListSectionComponent(
10721076
theme: environment.theme,
1077+
style: .glass,
10731078
header: nil,
10741079
footer: nil,
10751080
items: [
10761081
AnyComponentWithIdentity(id: 0, component: AnyComponent(ListActionItemComponent(
10771082
theme: environment.theme,
1083+
style: .glass,
10781084
title: AnyComponent(VStack([
10791085
AnyComponentWithIdentity(id: AnyHashable(0), component: AnyComponent(MultilineTextComponent(
10801086
text: .plain(NSAttributedString(
@@ -1365,6 +1371,7 @@ final class AffiliateProgramSetupScreenComponent: Component {
13651371
transition: transition,
13661372
component: AnyComponent(ListSectionComponent(
13671373
theme: environment.theme,
1374+
style: .glass,
13681375
header: AnyComponent(MultilineTextComponent(
13691376
text: .plain(NSAttributedString(
13701377
string: environment.strings.AffiliateSetup_ConnectedSectionTitle,
@@ -1519,6 +1526,7 @@ final class AffiliateProgramSetupScreenComponent: Component {
15191526
transition: transition,
15201527
component: AnyComponent(ListSectionComponent(
15211528
theme: environment.theme,
1529+
style: .glass,
15221530
header: AnyComponent(HStack(suggestedHeaderItems, spacing: 4.0, alignment: .alternatingLeftRight)),
15231531
footer: nil,
15241532
items: suggestedSectionItems,

submodules/TelegramUI/Components/PeerInfo/AffiliateProgramSetupScreen/Sources/JoinAffiliateProgramScreen.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,10 +1169,12 @@ private final class JoinAffiliateProgramScreenComponent: Component {
11691169
case .active:
11701170
actionButtonTitle = environment.strings.AffiliateProgram_ActionCopyLink
11711171
}
1172+
11721173
let actionButtonSize = self.actionButton.update(
11731174
transition: transition,
11741175
component: AnyComponent(ButtonComponent(
11751176
background: ButtonComponent.Background(
1177+
style: .glass,
11761178
color: environment.theme.list.itemCheckColors.fillColor,
11771179
foreground: environment.theme.list.itemCheckColors.foregroundColor,
11781180
pressedColor: environment.theme.list.itemCheckColors.fillColor.withMultipliedAlpha(0.9)
@@ -1206,7 +1208,7 @@ private final class JoinAffiliateProgramScreenComponent: Component {
12061208
}
12071209
)),
12081210
environment: {},
1209-
containerSize: CGSize(width: availableSize.width - sideInset * 2.0, height: 50.0)
1211+
containerSize: CGSize(width: availableSize.width - 30.0 * 2.0, height: 52.0)
12101212
)
12111213

12121214
let bottomTextSize = self.bottomText.update(

submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/ListItems/PeerInfoScreenCallListItem.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@ private final class PeerInfoScreenCallListItemNode: PeerInfoScreenItemNode {
100100
self.addSubnode(itemNode)
101101
}
102102

103-
let height = itemNode.contentSize.height
103+
let verticalInset: CGFloat = 8.0
104+
let height = itemNode.contentSize.height + verticalInset * 2.0
104105

105-
transition.updateFrame(node: itemNode, frame: CGRect(origin: CGPoint(), size: itemNode.bounds.size))
106+
transition.updateFrame(node: itemNode, frame: CGRect(origin: CGPoint(x: 0.0, y: verticalInset), size: itemNode.bounds.size))
106107

107108
let highlightNodeOffset: CGFloat = topItem == nil ? 0.0 : UIScreenPixel
108109
self.selectionNode.update(size: CGSize(width: width, height: height + highlightNodeOffset), theme: presentationData.theme, transition: transition)
@@ -115,7 +116,7 @@ private final class PeerInfoScreenCallListItemNode: PeerInfoScreenItemNode {
115116
let hasTopCorners = hasCorners && topItem == nil
116117
let hasBottomCorners = hasCorners && bottomItem == nil
117118

118-
self.maskNode.image = hasCorners ? PresentationResourcesItemList.cornersImage(presentationData.theme, top: hasTopCorners, bottom: hasBottomCorners) : nil
119+
self.maskNode.image = hasCorners ? PresentationResourcesItemList.cornersImage(presentationData.theme, top: hasTopCorners, bottom: hasBottomCorners, glass: true) : nil
119120
self.maskNode.frame = CGRect(origin: CGPoint(x: safeInsets.left, y: 0.0), size: CGSize(width: width - safeInsets.left - safeInsets.right, height: height))
120121
self.bottomSeparatorNode.isHidden = hasBottomCorners
121122

0 commit comments

Comments
 (0)