mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-06 17:00:13 +00:00
Merge commit 'b1bcf52a09d4a2359ca7e69ac28a92e8e2261b78' into beta
This commit is contained in:
commit
5fe77d8fd6
@ -15004,3 +15004,7 @@ Sorry for the inconvenience.";
|
||||
"Notification.PrepaidGiftUpgrade" = "Gift Upgrade for %@";
|
||||
"Notification.PrepaidGiftUpgrade.Stars_1" = "%@ Star";
|
||||
"Notification.PrepaidGiftUpgrade.Stars_any" = "%@ Stars";
|
||||
|
||||
"ProfileLevelInfo.RatingTitle" = "Rating";
|
||||
"ProfileLevelInfo.FutureRatingTitle" = "Future Rating";
|
||||
|
||||
|
||||
@ -589,7 +589,7 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
||||
}
|
||||
|
||||
var currentSavedMusic: TelegramMediaFile?
|
||||
if !self.isSettings, let screenData {
|
||||
if let peer, peer.id != self.context.account.peerId || self.isMyProfile, let screenData {
|
||||
if let savedMusicState = screenData.savedMusicState {
|
||||
currentSavedMusic = savedMusicState.files.first
|
||||
} else if let cachedUserData = screenData.cachedData as? CachedUserData {
|
||||
|
||||
@ -377,24 +377,46 @@ private final class ProfileLevelInfoScreenComponent: Component {
|
||||
descriptionTextString = environment.strings.ProfileLevelInfo_OtherDescription(component.peer.compactDisplayTitle).string
|
||||
}
|
||||
|
||||
//TODO:localize
|
||||
var titleItems: [AnimatedTextComponent.Item] = []
|
||||
|
||||
let ratingTitle = environment.strings.ProfileLevelInfo_RatingTitle
|
||||
let futureTitle = environment.strings.ProfileLevelInfo_FutureRatingTitle
|
||||
|
||||
if self.isPreviewingPendingRating {
|
||||
titleItems.append(AnimatedTextComponent.Item(
|
||||
id: AnyHashable(0),
|
||||
isUnbreakable: false,
|
||||
content: .text("Future ")
|
||||
))
|
||||
titleItems.append(AnimatedTextComponent.Item(
|
||||
id: AnyHashable(1),
|
||||
isUnbreakable: true,
|
||||
content: .text("Rating")
|
||||
))
|
||||
if let range = futureTitle.range(of: ratingTitle) {
|
||||
if !futureTitle[..<range.lowerBound].isEmpty {
|
||||
titleItems.append(AnimatedTextComponent.Item(
|
||||
id: AnyHashable(0),
|
||||
isUnbreakable: false,
|
||||
content: .text(String(futureTitle[..<range.lowerBound]))
|
||||
))
|
||||
}
|
||||
|
||||
titleItems.append(AnimatedTextComponent.Item(
|
||||
id: AnyHashable(1),
|
||||
isUnbreakable: true,
|
||||
content: .text(ratingTitle)
|
||||
))
|
||||
|
||||
if !futureTitle[range.upperBound...].isEmpty {
|
||||
titleItems.append(AnimatedTextComponent.Item(
|
||||
id: AnyHashable(2),
|
||||
isUnbreakable: false,
|
||||
content: .text(String(futureTitle[range.upperBound...]))
|
||||
))
|
||||
}
|
||||
} else {
|
||||
titleItems.append(AnimatedTextComponent.Item(
|
||||
id: AnyHashable(0),
|
||||
isUnbreakable: true,
|
||||
content: .text(futureTitle)
|
||||
))
|
||||
}
|
||||
} else {
|
||||
titleItems.append(AnimatedTextComponent.Item(
|
||||
id: AnyHashable(1),
|
||||
isUnbreakable: true,
|
||||
content: .text("Rating")
|
||||
content: .text(ratingTitle)
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user