mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-31 07:30:40 +00:00
Merge commit '6a71c6ccad254254d3bd7f95a1671902507d83c0'
This commit is contained in:
commit
cff0b3f109
@ -10215,9 +10215,9 @@ Sorry for the inconvenience.";
|
||||
"ReassignBoost.ExpiresOn" = "Boost expires on %@";
|
||||
"ReassignBoost.WaitForCooldown" = "Wait until the boost is available or get **%1$@** more boosts by gifting a **Telegram Premium** subscription.";
|
||||
|
||||
"ReassignBoost.Success" = "%1$@ are reassigned from %2$@.";
|
||||
"ReassignBoost.Boosts_1" = "%@ boost";
|
||||
"ReassignBoost.Boosts_any" = "%@ boosts";
|
||||
"ReassignBoost.Success" = "%1$@ from %2$@.";
|
||||
"ReassignBoost.Boosts_1" = "%@ boost is reassigned";
|
||||
"ReassignBoost.Boosts_any" = "%@ boosts are reassigned";
|
||||
"ReassignBoost.OtherChannels_1" = "%@ other channel";
|
||||
"ReassignBoost.OtherChannels_any" = "%@ other channels";
|
||||
|
||||
@ -10433,6 +10433,10 @@ Sorry for the inconvenience.";
|
||||
"CountriesList.SaveCountries" = "Save Countries";
|
||||
"CountriesList.SelectUpTo_1" = "select up to %@ country";
|
||||
"CountriesList.SelectUpTo_any" = "select up to %@ countries";
|
||||
"CountriesList.Search" = "Search";
|
||||
"CountriesList.MaximumReached" = "You can select up to %@.";
|
||||
"CountriesList.MaximumReached.Countries_1" = "%@ country";
|
||||
"CountriesList.MaximumReached.Countries_any" = "%@ countries";
|
||||
|
||||
"Message.GiveawayOngoing" = "Giveaway: %1$@ on %2$@";
|
||||
"Message.GiveawayOngoing.Winners_1" = "%@ winner to be selected";
|
||||
|
@ -304,12 +304,14 @@ class GiftOptionItemNode: ItemListRevealOptionsItemNode {
|
||||
let (labelLayout, labelApply) = makeLabelLayout(TextNodeLayoutArguments(attributedString: labelAttributedString, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: params.width, height: .greatestFiniteMagnitude)))
|
||||
|
||||
var textConstrainedWidth = params.width - leftInset - 8.0 - editingOffset - rightInset - labelLayout.size.width - avatarInset
|
||||
var subtitleConstrainedWidth = textConstrainedWidth
|
||||
if let label = item.label, case .semitransparent = label {
|
||||
textConstrainedWidth -= 54.0
|
||||
subtitleConstrainedWidth -= 30.0
|
||||
}
|
||||
|
||||
let (titleLayout, titleApply) = makeTitleLayout(TextNodeLayoutArguments(attributedString: titleAttributedString, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: textConstrainedWidth, height: .greatestFiniteMagnitude)))
|
||||
let (statusLayout, statusApply) = makeStatusLayout(TextNodeLayoutArguments(attributedString: statusAttributedString, backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: textConstrainedWidth, height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
|
||||
let (statusLayout, statusApply) = makeStatusLayout(TextNodeLayoutArguments(attributedString: statusAttributedString, backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: subtitleConstrainedWidth, height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
|
||||
|
||||
let (badgeLayout, badgeApply) = makeBadgeLayout(TextNodeLayoutArguments(attributedString: badgeAttributedString, backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: textConstrainedWidth, height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
|
||||
|
||||
|
@ -1556,7 +1556,7 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
|
||||
for contentNodeItemValue in contentNodeMessagesAndClasses {
|
||||
let contentNodeItem = contentNodeItemValue as (message: Message, type: AnyClass, attributes: ChatMessageEntryAttributes, bubbleAttributes: BubbleItemAttributes)
|
||||
if contentNodeItem.type == ChatMessageGiveawayBubbleContentNode.self {
|
||||
maximumContentWidth = 260.0
|
||||
maximumContentWidth = min(305.0, maximumContentWidth)
|
||||
break
|
||||
}
|
||||
if contentNodeItem.type == ChatMessageInstantVideoBubbleContentNode.self, !contentNodeItem.bubbleAttributes.isAttachment {
|
||||
|
@ -319,7 +319,7 @@ public class ChatMessageGiveawayBubbleContentNode: ChatMessageBubbleContentNode
|
||||
let (participantsTitleLayout, participantsTitleApply) = makeParticipantsTitleLayout(TextNodeLayoutArguments(attributedString: participantsTitleString, backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: maxTextWidth, height: CGFloat.greatestFiniteMagnitude), alignment: .center, cutout: nil, insets: UIEdgeInsets()))
|
||||
let (participantsTextLayout, participantsTextApply) = makeParticipantsTextLayout(TextNodeLayoutArguments(attributedString: participantsTextString, backgroundColor: nil, maximumNumberOfLines: 5, truncationType: .end, constrainedSize: CGSize(width: maxTextWidth, height: CGFloat.greatestFiniteMagnitude), alignment: .center, cutout: nil, insets: UIEdgeInsets()))
|
||||
|
||||
let (countriesTextLayout, countriesTextApply) = makeCountriesTextLayout(TextNodeLayoutArguments(attributedString: countriesTextString, backgroundColor: nil, maximumNumberOfLines: 5, truncationType: .end, constrainedSize: CGSize(width: maxTextWidth, height: CGFloat.greatestFiniteMagnitude), alignment: .center, cutout: nil, insets: UIEdgeInsets()))
|
||||
let (countriesTextLayout, countriesTextApply) = makeCountriesTextLayout(TextNodeLayoutArguments(attributedString: countriesTextString, backgroundColor: nil, maximumNumberOfLines: 0, truncationType: .end, constrainedSize: CGSize(width: maxTextWidth, height: CGFloat.greatestFiniteMagnitude), alignment: .center, cutout: nil, insets: UIEdgeInsets()))
|
||||
|
||||
let (dateTitleLayout, dateTitleApply) = makeDateTitleLayout(TextNodeLayoutArguments(attributedString: dateTitleString, backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: maxTextWidth, height: CGFloat.greatestFiniteMagnitude), alignment: .center, cutout: nil, insets: UIEdgeInsets()))
|
||||
let (dateTextLayout, dateTextApply) = makeDateTextLayout(TextNodeLayoutArguments(attributedString: dateTextString, backgroundColor: nil, maximumNumberOfLines: 5, truncationType: .end, constrainedSize: CGSize(width: maxTextWidth, height: CGFloat.greatestFiniteMagnitude), alignment: .center, cutout: nil, insets: UIEdgeInsets()))
|
||||
|
@ -468,7 +468,8 @@ final class CountriesMultiselectionScreenComponent: Component {
|
||||
self.hapticFeedback.error()
|
||||
|
||||
let presentationData = component.context.sharedContext.currentPresentationData.with { $0 }
|
||||
controller.present(UndoOverlayController(presentationData: presentationData, content: .info(title: nil, text: "You can select maximum \(limit) countries.", timeout: nil, customUndoText: nil), elevatedLayout: false, position: .bottom, animateInAsReplacement: false, action: { _ in return false }), in: .current)
|
||||
let countriesValue = environment.strings.CountriesList_MaximumReached_Countries(limit)
|
||||
controller.present(UndoOverlayController(presentationData: presentationData, content: .info(title: nil, text: environment.strings.CountriesList_MaximumReached(countriesValue).string, timeout: nil, customUndoText: nil), elevatedLayout: false, position: .bottom, animateInAsReplacement: false, action: { _ in return false }), in: .current)
|
||||
return
|
||||
}
|
||||
toggleCountry()
|
||||
@ -721,7 +722,7 @@ final class CountriesMultiselectionScreenComponent: Component {
|
||||
))
|
||||
}
|
||||
|
||||
let placeholder: String = "Search"
|
||||
let placeholder: String = environment.strings.CountriesList_Search
|
||||
self.navigationTextField.parentState = state
|
||||
let navigationTextFieldSize = self.navigationTextField.update(
|
||||
transition: transition,
|
||||
|
Loading…
x
Reference in New Issue
Block a user