Skip to content

Commit 2dfe959

Browse files
committed
Various fixes
1 parent 94117d1 commit 2dfe959

File tree

9 files changed

+82
-55
lines changed

9 files changed

+82
-55
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13885,8 +13885,8 @@ Sorry for the inconvenience.";
1388513885
"Chat.NonContactUser.Disclaimer" = "Not an official account";
1388613886
"Chat.NonContactUser.AnonymousNumber" = "Anonymous";
1388713887

13888-
"Chat.NonContactUser.UpdatedName" = "User updated name %2$@";
13889-
"Chat.NonContactUser.UpdatedPhoto" = "User updated photo %2$@";
13888+
"Chat.NonContactUser.UpdatedName" = "User updated name %1$@";
13889+
"Chat.NonContactUser.UpdatedPhoto" = "User updated photo %1$@";
1389013890
"Chat.NonContactUser.UpdatedToday" = "today";
1389113891
"Chat.NonContactUser.UpdatedDays_1" = "%@ day ago";
1389213892
"Chat.NonContactUser.UpdatedDays_any" = "%@ days ago";

submodules/StatisticsUI/Sources/ChannelStatsController.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ private enum StatsEntry: ItemListNodeEntry {
250250
case adsTonBalanceInfo(PresentationTheme, String)
251251

252252
case adsStarsBalanceTitle(PresentationTheme, String)
253-
case adsStarsBalance(PresentationTheme, StarsRevenueStats, Bool, Bool, Int32?)
253+
case adsStarsBalance(PresentationTheme, StarsRevenueStats, Bool, Bool, Bool, Int32?)
254254
case adsStarsBalanceInfo(PresentationTheme, String)
255255

256256
case earnStarsInfo
@@ -827,8 +827,8 @@ private enum StatsEntry: ItemListNodeEntry {
827827
} else {
828828
return false
829829
}
830-
case let .adsStarsBalance(lhsTheme, lhsStats, lhsCanWithdraw, lhsIsEnabled, lhsCooldownUntilTimestamp):
831-
if case let .adsStarsBalance(rhsTheme, rhsStats, rhsCanWithdraw, rhsIsEnabled, rhsCooldownUntilTimestamp) = rhs, lhsTheme === rhsTheme, lhsStats == rhsStats, lhsCanWithdraw == rhsCanWithdraw, lhsIsEnabled == rhsIsEnabled, lhsCooldownUntilTimestamp == rhsCooldownUntilTimestamp {
830+
case let .adsStarsBalance(lhsTheme, lhsStats, lhsCanWithdraw, lhsCanBuyAds, lhsIsEnabled, lhsCooldownUntilTimestamp):
831+
if case let .adsStarsBalance(rhsTheme, rhsStats, rhsCanWithdraw, rhsCanBuyAds, rhsIsEnabled, rhsCooldownUntilTimestamp) = rhs, lhsTheme === rhsTheme, lhsStats == rhsStats, lhsCanWithdraw == rhsCanWithdraw, lhsCanBuyAds == rhsCanBuyAds, lhsIsEnabled == rhsIsEnabled, lhsCooldownUntilTimestamp == rhsCooldownUntilTimestamp {
832832
return true
833833
} else {
834834
return false
@@ -1108,7 +1108,7 @@ private enum StatsEntry: ItemListNodeEntry {
11081108
return ItemListTextItem(presentationData: presentationData, text: .markdown(text), sectionId: self.section, linkAction: { _ in
11091109
arguments.openMonetizationInfo()
11101110
})
1111-
case let .adsStarsBalance(_, stats, canWithdraw, isEnabled, cooldownUntilTimestamp):
1111+
case let .adsStarsBalance(_, stats, canWithdraw, canBuyAds, isEnabled, cooldownUntilTimestamp):
11121112
return MonetizationBalanceItem(
11131113
context: arguments.context,
11141114
presentationData: presentationData,
@@ -1131,7 +1131,7 @@ private enum StatsEntry: ItemListNodeEntry {
11311131
arguments.requestStarsWithdraw()
11321132
}
11331133
},
1134-
buyAdsAction: canWithdraw ? {
1134+
buyAdsAction: canWithdraw && canBuyAds ? {
11351135
arguments.buyAds()
11361136
} : nil,
11371137
sectionId: self.section,
@@ -1649,7 +1649,7 @@ private func monetizationEntries(
16491649

16501650
if canViewStarsRevenue, let starsData, starsData.balances.overallRevenue > StarsAmount.zero {
16511651
entries.append(.adsStarsBalanceTitle(presentationData.theme, presentationData.strings.Monetization_StarsBalanceTitle))
1652-
entries.append(.adsStarsBalance(presentationData.theme, starsData, isCreator && starsData.balances.availableBalance > StarsAmount.zero, starsData.balances.withdrawEnabled, starsData.balances.nextWithdrawalTimestamp))
1652+
entries.append(.adsStarsBalance(presentationData.theme, starsData, isCreator && starsData.balances.availableBalance > StarsAmount.zero, !isGroup, starsData.balances.withdrawEnabled, starsData.balances.nextWithdrawalTimestamp))
16531653
entries.append(.adsStarsBalanceInfo(presentationData.theme, isGroup ? presentationData.strings.Monetization_Balance_StarsInfoGroup : presentationData.strings.Monetization_Balance_StarsInfo))
16541654
}
16551655

submodules/TelegramCore/Sources/TelegramEngine/Messages/SendAsPeers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func _internal_peerSendAsAvailablePeers(accountPeerId: PeerId, network: Network,
109109
return .single([])
110110
}
111111

112-
if let _ = peer as? TelegramChannel {
112+
if let channel = peer as? TelegramChannel, case .group = channel.info {
113113
} else {
114114
return .single([])
115115
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public struct ChatMessageEntryAttributes: Equatable {
4343

4444
public enum ChatInfoData: Equatable {
4545
case botInfo(title: String, text: String, photo: TelegramMediaImage?, video: TelegramMediaFile?)
46-
case userInfo(peer: EnginePeer, registrationDate: String?, phoneCountry: String?, groupsInCommonCount: Int32)
46+
case userInfo(peer: EnginePeer, verification: PeerVerification?, registrationDate: String?, phoneCountry: String?, groupsInCommonCount: Int32)
4747
}
4848

4949
public enum ChatHistoryEntry: Identifiable, Comparable {

submodules/TelegramUI/Components/Chat/ChatUserInfoItem/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ swift_library(
2828
"//submodules/CountrySelectionUI",
2929
"//submodules/TelegramStringFormatting",
3030
"//submodules/TelegramUI/Components/Chat/MergedAvatarsNode",
31+
"//submodules/TelegramUI/Components/TextNodeWithEntities",
3132
],
3233
visibility = [
3334
"//visibility:public",

0 commit comments

Comments
 (0)