Skip to content

Commit 06cb1ec

Browse files
committed
Various improvements
1 parent 6db5077 commit 06cb1ec

File tree

8 files changed

+27
-13
lines changed

8 files changed

+27
-13
lines changed

Telegram/Telegram-iOS/en.lproj/Localizable.strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15614,7 +15614,7 @@ Error: %8$@";
1561415614
"Notification.StarGiftOffer.Expiration.Hours_any" = "%@ h";
1561515615
"Notification.StarGiftOffer.Expiration.Minutes_1" = "%@ m";
1561615616
"Notification.StarGiftOffer.Expiration.Minutes_any" = "%@ m";
15617-
"Notification.StarGiftOffer.Expiration.Delimiter" = "";
15617+
"Notification.StarGiftOffer.Expiration.Delimiter" = " ";
1561815618

1561915619
"Chat.GiftPurchaseOffer.AcceptConfirmation.Title" = "Confirm Sale";
1562015620
"Chat.GiftPurchaseOffer.AcceptConfirmation.Text" = "Do you want to sell **%1$@** to %2$@ for **%3$@**? You'll receive **%4$@** after fees.";

submodules/LegacyComponents/Sources/TGViewController.mm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,11 @@ + (UIEdgeInsets)safeAreaInsetForOrientation:(UIInterfaceOrientation)orientation
11351135
return UIEdgeInsetsMake(0.0f, 44.0f, 21.0f, 44.0f);
11361136

11371137
default:
1138-
return UIEdgeInsetsMake(44.0f, 0.0f, 34.0f, 0.0f);
1138+
if (iosMajorVersion() >= 26) {
1139+
return UIEdgeInsetsMake(44.0f, 0.0f, 20.0f, 0.0f);
1140+
} else {
1141+
return UIEdgeInsetsMake(44.0f, 0.0f, 34.0f, 0.0f);
1142+
}
11391143
}
11401144
}
11411145

submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ public func makeDefaultDarkPresentationTheme(extendingThemeReference: Presentati
348348
badgeBackgroundColor: UIColor(rgb: 0xffffff),
349349
badgeStrokeColor: UIColor(rgb: 0x1c1c1d),
350350
badgeTextColor: UIColor(rgb: 0x000000),
351-
segmentedBackgroundColor: UIColor(rgb: 0x3a3b3d),
352-
segmentedForegroundColor: UIColor(rgb: 0x6f7075),
351+
segmentedBackgroundColor: UIColor(rgb: 0xffffff, alpha: 0.11),
352+
segmentedForegroundColor: UIColor(rgb: 0xffffff, alpha: 0.36),
353353
segmentedTextColor: UIColor(rgb: 0xffffff),
354354
segmentedDividerColor: UIColor(rgb: 0x505155),
355355
clearButtonBackgroundColor: UIColor(rgb: 0xffffff, alpha: 0.1),

submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public func customizeDefaultDarkTintedPresentationTheme(theme: PresentationTheme
139139
opaqueBackgroundColor: mainBackgroundColor,
140140
separatorColor: mainSeparatorColor,
141141
segmentedBackgroundColor: mainInputColor,
142-
segmentedForegroundColor: mainBackgroundColor,
142+
segmentedForegroundColor: mainSecondaryTextColor?.withAlphaComponent(0.4),
143143
segmentedDividerColor: mainSecondaryTextColor?.withAlphaComponent(0.5)
144144
),
145145
navigationSearchBar: rootController.navigationSearchBar.withUpdated(
@@ -571,7 +571,7 @@ public func makeDefaultDarkTintedPresentationTheme(extendingThemeReference: Pres
571571
badgeStrokeColor: UIColor(rgb: 0xef5b5b),
572572
badgeTextColor: UIColor(rgb: 0xffffff),
573573
segmentedBackgroundColor: mainInputColor,
574-
segmentedForegroundColor: mainBackgroundColor,
574+
segmentedForegroundColor: mainSecondaryTextColor.withAlphaComponent(0.4),
575575
segmentedTextColor: UIColor(rgb: 0xffffff),
576576
segmentedDividerColor: mainSecondaryTextColor.withAlphaComponent(0.5),
577577
clearButtonBackgroundColor: UIColor(rgb: 0xffffff, alpha: 0.1),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ private final class DemoSheetContent: CombinedComponent {
293293
let bottomEdgeEffectHeight = 108.0
294294
let bottomEdgeEffect = bottomEdgeEffect.update(
295295
component: EdgeEffectComponent(
296-
color: .clear,
296+
color: environment.theme.actionSheet.opaqueItemBackgroundColor,
297297
blur: true,
298298
alpha: 1.0,
299299
size: CGSize(width: context.availableSize.width, height: bottomEdgeEffectHeight),

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,15 +732,23 @@ private final class GiftUpgradePreviewScreenComponent: Component {
732732
transition.setFrame(view: titleView, frame: titleFrame)
733733
}
734734

735+
var subtitleItems: [AnimatedTextComponent.Item] = []
736+
let subtitleString = self.isPlaying ? environment.strings.Gift_Variants_RandomTraits : environment.strings.Gift_Variants_SelectedTraits
737+
let words = subtitleString.components(separatedBy: " ")
738+
for i in 0 ..< words.count {
739+
var text = words[i]
740+
if i > 0 {
741+
text = " \(text)"
742+
}
743+
subtitleItems.append(AnimatedTextComponent.Item(id: text.lowercased(), content: .text(text)))
744+
}
745+
735746
let subtitleSize = self.subtitle.update(
736747
transition: .spring(duration: 0.2),
737748
component: AnyComponent(AnimatedTextComponent(
738749
font: Font.regular(14.0),
739750
color: secondaryTextColor,
740-
items: [
741-
AnimatedTextComponent.Item(id: self.isPlaying ? "random" : "selected", content: .text(self.isPlaying ? "Random" : "Selected")),
742-
AnimatedTextComponent.Item(id: "traits", content: .text(" Traits"))
743-
],
751+
items: subtitleItems,
744752
noDelay: true,
745753
blur: true
746754
)),

submodules/TelegramUI/Components/SegmentControlComponent/Sources/SegmentControlComponent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public final class SegmentControlComponent: Component {
127127
}
128128

129129
if themeUpdated {
130-
let backgroundColor = component.theme.overallDarkAppearance ? component.theme.list.itemBlocksBackgroundColor : component.theme.rootController.navigationBar.segmentedBackgroundColor
130+
let backgroundColor = component.theme.rootController.navigationBar.segmentedBackgroundColor
131131
segmentedView.setTitleTextAttributes([
132132
.font: Font.semibold(14.0),
133133
.foregroundColor: component.theme.rootController.navigationBar.segmentedTextColor

submodules/TelegramUI/Components/Stars/StarsWithdrawalScreen/Sources/StarsWithdrawalScreen.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,13 @@ private final class SheetContent: CombinedComponent {
213213
case .stars:
214214
amountTitle = environment.strings.Gift_Offer_PriceSectionStars
215215
minAmount = StarsAmount(value: gift.minOfferStars ?? resaleConfiguration.starGiftResaleMinStarsAmount, nanos: 0)
216+
maxAmount = StarsAmount(value: resaleConfiguration.starGiftResaleMaxStarsAmount, nanos: 0)
216217
case .ton:
217218
amountTitle = environment.strings.Gift_Offer_PriceSectionTon
218219
minAmount = StarsAmount(value: resaleConfiguration.starGiftResaleMinTonAmount, nanos: 0)
220+
maxAmount = StarsAmount(value: resaleConfiguration.starGiftResaleMaxTonAmount, nanos: 0)
219221
}
220-
maxAmount = nil
222+
221223
amountPlaceholder = environment.strings.Gift_Offer_PricePlaceholder
222224

223225
if let usdWithdrawRate = withdrawConfiguration.usdWithdrawRate, let tonUsdRate = withdrawConfiguration.tonUsdRate, let amount = state.amount, amount > StarsAmount.zero {

0 commit comments

Comments
 (0)