Skip to content

Commit 7a89a58

Browse files
committed
Various improvements
1 parent 009ff2a commit 7a89a58

File tree

10 files changed

+767
-19
lines changed

10 files changed

+767
-19
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13863,6 +13863,12 @@ Sorry for the inconvenience.";
1386313863
"Stars.Intro.Transaction.PaidMessage_1" = "Fee for %@ Message";
1386413864
"Stars.Intro.Transaction.PaidMessage_any" = "Fee for %@ Messages";
1386513865

13866+
"Stars.Transaction.TelegramPremium_1" = "Premium for %@ Month";
13867+
"Stars.Transaction.TelegramPremium_any" = "Premium for %@ Months";
13868+
13869+
"Stars.Intro.Transaction.TelegramPremium_1" = "Premium for %@ Month";
13870+
"Stars.Intro.Transaction.TelegramPremium_any" = "Premium for %@ Months";
13871+
1386613872
"Stars.Purchase.SendMessageInfo" = "Buy Stars to send a message to **%@**.";
1386713873
"Stars.Purchase.SendGroupMessageInfo" = "Buy Stars to send a message in **%@**.";
1386813874

submodules/ShareController/Sources/ShareControllerNode.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,9 +1329,11 @@ final class ShareControllerNode: ViewControllerTracingNode, ASScrollViewDelegate
13291329
if !self.inputFieldNode.text.isEmpty {
13301330
count += 1
13311331
}
1332+
var chargingPeers: [EnginePeer] = []
13321333
var totalAmount: StarsAmount = .zero
13331334
for peer in peers {
13341335
if let stars = requiresStars[peer.id] {
1336+
chargingPeers.append(peer)
13351337
totalAmount = totalAmount + StarsAmount(value: stars, nanos: 0)
13361338
}
13371339
}
@@ -1340,7 +1342,7 @@ final class ShareControllerNode: ViewControllerTracingNode, ASScrollViewDelegate
13401342
context: nil,
13411343
presentationData: self.presentationData,
13421344
updatedPresentationData: nil,
1343-
peers: peers,
1345+
peers: chargingPeers,
13441346
count: count,
13451347
amount: totalAmount,
13461348
totalAmount: totalAmount,

submodules/TelegramCore/Sources/TelegramEngine/Privacy/UpdatedAccountPrivacySettings.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ func _internal_updateGlobalPrivacySettings(account: Account, settings: GlobalPri
352352
var noncontactPeersPaidStars: Int64?
353353
switch settings.nonContactChatsPrivacy {
354354
case .everybody:
355-
break
355+
flags |= 1 << 5
356+
noncontactPeersPaidStars = 0
356357
case .requirePremium:
357358
flags |= 1 << 4
358359
case let .paidMessages(starsAmount):

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2678,7 +2678,7 @@ public class GiftViewScreen: ViewControllerComponentContainer {
26782678
}
26792679

26802680
convertToStarsImpl = { [weak self] in
2681-
guard let self, let arguments = self.subject.arguments, let reference = arguments.reference, let fromPeerName = arguments.fromPeerName, let convertStars = arguments.convertStars, let navigationController = self.navigationController as? NavigationController else {
2681+
guard let self, let starsContext = context.starsContext, let arguments = self.subject.arguments, let reference = arguments.reference, let fromPeerName = arguments.fromPeerName, let convertStars = arguments.convertStars, let navigationController = self.navigationController as? NavigationController else {
26822682
return
26832683
}
26842684

@@ -2725,6 +2725,8 @@ public class GiftViewScreen: ViewControllerComponentContainer {
27252725

27262726
if let navigationController {
27272727
Queue.mainQueue().after(0.5) {
2728+
starsContext.load(force: true)
2729+
27282730
let text: String
27292731
if isChannelGift {
27302732
text = presentationData.strings.Gift_Convert_Success_ChannelText(presentationData.strings.Gift_Convert_Success_ChannelText_Stars(Int32(convertStars))).string

submodules/TelegramUI/Components/PeerInfo/PeerInfoCoverComponent/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ swift_library(
2222
"//submodules/Components/ComponentDisplayAdapters",
2323
"//submodules/TelegramUI/Components/EmojiTextAttachmentView",
2424
"//submodules/Utils/LokiRng",
25+
"//submodules/TextFormat",
2526
],
2627
visibility = [
2728
"//visibility:public",

0 commit comments

Comments
 (0)