Emoji and status improvements

This commit is contained in:
Ali
2022-09-02 20:10:43 +04:00
parent fe3715bd90
commit e4f1c6aa72
34 changed files with 1190 additions and 176 deletions

View File

@@ -146,6 +146,16 @@ public func muteForIntervalString(strings: PresentationStrings, value: Int32) ->
}
}
public func setTimeoutForIntervalString(strings: PresentationStrings, value: Int32) -> String {
if value < 60 * 60 {
return strings.SetTimeoutFor_Minutes(max(1, value / (60)))
} else if value < 60 * 60 * 24 {
return strings.SetTimeoutFor_Hours(max(1, value / (60 * 60)))
} else {
return strings.SetTimeoutFor_Days(max(1, value / (60 * 60 * 24)))
}
}
public func mutedForTimeIntervalString(strings: PresentationStrings, value: Int32) -> String {
if value < 60 * 60 {
return strings.MutedForTime_Minutes(max(1, value / (60)))