mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Fix send when online tooltip display condition
This commit is contained in:
@@ -42,6 +42,14 @@ public func stringForMessageTimestamp(timestamp: Int32, dateTimeFormat: Presenta
|
||||
return stringForShortTimestamp(hours: timeinfo.tm_hour, minutes: timeinfo.tm_min, dateTimeFormat: dateTimeFormat)
|
||||
}
|
||||
|
||||
public func getDateTimeComponents(timestamp: Int32) -> (day: Int32, month: Int32, year: Int32, hour: Int32, minutes: Int32) {
|
||||
var t: time_t = Int(timestamp)
|
||||
var timeinfo = tm()
|
||||
localtime_r(&t, &timeinfo);
|
||||
|
||||
return (timeinfo.tm_mday, timeinfo.tm_mon + 1, timeinfo.tm_year, timeinfo.tm_hour, timeinfo.tm_min)
|
||||
}
|
||||
|
||||
public func stringForMediumDate(timestamp: Int32, strings: PresentationStrings, dateTimeFormat: PresentationDateTimeFormat) -> String {
|
||||
var t: time_t = Int(timestamp)
|
||||
var timeinfo = tm()
|
||||
|
||||
Reference in New Issue
Block a user