[WIP] Saved messages

This commit is contained in:
Isaac
2023-12-25 22:58:09 +04:00
parent 4651c39083
commit 0e75f18f14
65 changed files with 934 additions and 369 deletions

View File

@@ -71,22 +71,24 @@ public func stringForMessageTimestampStatus(accountPeerId: PeerId, message: Mess
}
}
let timestamp: Int32
var timestamp: Int32
if let scheduleTime = message.scheduleTime {
timestamp = scheduleTime
} else {
timestamp = message.timestamp
}
var dateText = stringForMessageTimestamp(timestamp: timestamp, dateTimeFormat: dateTimeFormat)
if timestamp == scheduleWhenOnlineTimestamp {
dateText = " "
}
var displayFullDate = false
if case .full = format, timestamp > 100000 {
displayFullDate = true
} else if let _ = message.forwardInfo, message.id.peerId == accountPeerId {
} else if let forwardInfo = message.forwardInfo, message.id.peerId == accountPeerId {
displayFullDate = true
timestamp = forwardInfo.date
}
var dateText = stringForMessageTimestamp(timestamp: timestamp, dateTimeFormat: dateTimeFormat)
if timestamp == scheduleWhenOnlineTimestamp {
dateText = " "
}
if displayFullDate {