mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
no message
This commit is contained in:
@@ -20,3 +20,17 @@ public func compactNumericCountString(_ count: Int) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
func timeIntervalString(strings: PresentationStrings, value: Int32) -> String {
|
||||
if value < 60 {
|
||||
return strings.MessageTimer_Seconds(value)
|
||||
} else if value < 60 * 60 {
|
||||
return strings.MessageTimer_Minutes(value / 60)
|
||||
} else if value < 60 * 60 * 24 {
|
||||
return strings.MessageTimer_Hours(value / (60 * 60))
|
||||
} else if value < 60 * 60 * 24 * 7 {
|
||||
return strings.MessageTimer_Days(value / (60 * 60 * 24))
|
||||
} else {
|
||||
return strings.MessageTimer_Weeks(value / (60 * 60 * 24 * 7))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user