mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Show extended auction round info
This commit is contained in:
@@ -15494,9 +15494,12 @@ Error: %8$@";
|
||||
"Gift.Auction.Hours_any" = "%@ hours";
|
||||
"Gift.Auction.Minutes_1" = "%@ minute";
|
||||
"Gift.Auction.Minutes_any" = "%@ minutes";
|
||||
"Gift.Auction.Seconds_1" = "%@ second";
|
||||
"Gift.Auction.Seconds_any" = "%@ seconds";
|
||||
"Gift.Auction.HoursEach_1" = "%@ hour each";
|
||||
"Gift.Auction.HoursEach_any" = "%@ hours each";
|
||||
"Gift.Auction.MinutesEach_1" = "%@ minute each";
|
||||
"Gift.Auction.MinutesEach_any" = "%@ minutes each";
|
||||
"Gift.Auction.Extension" = "+ %1$@ for late bids in top %2$@";
|
||||
|
||||
"ChatList.Auctions.UpcomingAuction" = "Upcoming Auction";
|
||||
|
||||
@@ -620,7 +620,7 @@ private final class GiftAuctionViewSheetContent: CombinedComponent {
|
||||
}
|
||||
|
||||
let title: String = start == end ? strings.Gift_Auction_TimeRound("\(start)").string : strings.Gift_Auction_TimeRounds("\(start)-\(end)").string
|
||||
let value: String
|
||||
var value: String
|
||||
if round.duration % 3600 == 0 {
|
||||
let hours = round.duration / 3600
|
||||
value = start == end ? strings.Gift_Auction_Hours(hours) : strings.Gift_Auction_HoursEach(hours)
|
||||
@@ -629,11 +629,24 @@ private final class GiftAuctionViewSheetContent: CombinedComponent {
|
||||
value = start == end ? strings.Gift_Auction_Minutes(minutes) : strings.Gift_Auction_MinutesEach(minutes)
|
||||
}
|
||||
|
||||
if case let .extendable(_, _, top, window) = round {
|
||||
var windowString: String
|
||||
if window % 60 == 0 {
|
||||
windowString = strings.Gift_Auction_Minutes(window)
|
||||
} else {
|
||||
windowString = strings.Gift_Auction_Seconds(window)
|
||||
}
|
||||
value += " \(strings.Gift_Auction_Extension(windowString, "\(top)").string)"
|
||||
}
|
||||
|
||||
tableItems.append(.init(
|
||||
id: "round_\(i)",
|
||||
title: title,
|
||||
component: AnyComponent(
|
||||
MultilineTextComponent(text: .plain(NSAttributedString(string: value, font: tableFont, textColor: tableTextColor)))
|
||||
MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(string: value, font: tableFont, textColor: tableTextColor)),
|
||||
maximumNumberOfLines: 3
|
||||
)
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user