Various fixes

This commit is contained in:
Ilya Laktyushin
2023-11-22 17:25:59 +04:00
parent 08bf729d29
commit 19d88aafcc
14 changed files with 88 additions and 62 deletions

View File

@@ -454,9 +454,9 @@ public func stringForStoryActivityTimestamp(strings: PresentationStrings, dateTi
let dayDifference = timeinfo.tm_yday - timeinfoNow.tm_yday
if dayDifference == 0 || dayDifference == -1 {
let day: RelativeTimestampFormatDay
if dayDifference == 0 {
let minutes = difference / (60 * 60)
return short ? strings.ShortTime_HoursAgo(minutes) : strings.Time_HoursAgo(minutes)
if dayDifference == 0 || short {
let hours = difference / (60 * 60)
return short ? strings.ShortTime_HoursAgo(hours) : strings.Time_HoursAgo(hours)
} else {
day = .yesterday
}